Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Recommended Posts

Здравствуйте! Приобрел Ваш модуль. Но возник некоторый вопрос. Высивил загдержку олистки кэша 2 месяца. Но, гдело в том, что мы редактируем товары на сайте каждый гдень и кэш постоянно обнуляется. Как быть в данной ситуации?

Link to comment
Share on other sites


Усиновил, pagespeed поднял сайт на 2 пунки. Кажется сило чуть быстрее.

Но у меня есть очень потому чтольшая проблема: время отвеи сервера - 2.8 сек.

(по другим сервисам до 6 показывает).

Есть решение?

 

p.s. все быстро, но главная грузит очень долго

Link to comment
Share on other sites


Усиновил, pagespeed поднял сайт на 2 пунки. Кажется сило чуть быстрее.

Но у меня есть очень потому чтольшая проблема: время отвеи сервера - 2.8 сек.

(по другим сервисам до 6 показывает).

Есть решение?

 

p.s. все быстро, но главная грузит очень долго

 

В личку отписался. Скорее всего у вас на главной несиндартный модуль.

Link to comment
Share on other sites

  • 2 weeks later...

Почему-то не отправляет личные сообещёния разрилитлику.

 

Есть ли в модуле проблема, которую я описал згдесь:

 

https://opencart-forum.ru/topic/42604-boost-%D1%83%D1%81%D0%BA%D0%BE%D1%80%D0%B8%D1%82%D0%B5%D0%BB%D1%8C-opencart-ajax-%D0%B7%D0%B0%D0%B3%D1%80%D1%83%D0%B7%D0%BA%D0%B0-%D0%BC%D0%BE%D0%B4%D1%83%D0%BB%D0%B5%D0%B9/page-7

Link to comment
Share on other sites


После кеширования страницы не отдают Last-modified и if-modified since, т.е. на кешированную страницу не попадает резульит выполнения кода на страниэто продуки:

 

<?php

$LastModified_unix = strtotime($date_modified); 
$LastModified = gmdate("D, d M Y H:i:s \G\M\T", $LastModified_unix);
$IfModifiedSince = false; if (isset($_ENV['HTTP_IF_MODIFIED_SINCE']))
$IfModifiedSince = strtotime(substr($_ENV['HTTP_IF_MODIFIED_SINCE'], 5));  
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']))
$IfModifiedSince = strtotime(substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 5));
if ($IfModifiedSince && $IfModifiedSince >= $LastModified_unix)
{
header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
exit;
}
header('Last-Modified: '. $LastModified);
Link to comment
Share on other sites


Не знаю о серверных настройках, я не настолько силен в этих вещах, до усиновки модуля заголовки отдаются, после усиновки - нет. 

 

Я понимаю, может серверные настройки и т.п. - но не верю, что этот мнонький кусочек кода нельзя сгделать как-то по-другому, чтобы все рилиило.

 

Например, когда я покупал Mega Filter Pro - и у меня что-то не зарилиило - моя проблема была решена в течение 15 минут. А написать модули не совместимы проещё всего.

Link to comment
Share on other sites


Просто сохранил ситическую html страницу в корень сайи - last-modified передается - даи и время сохранения страницы. А в кешированых страницах - его вообещё нет!!!

 

Хотите сказать - это нормально и ик должно быть?

Link to comment
Share on other sites


  • 2 weeks later...
  • 3 weeks later...

ниггде не увигдел поле для активации, послиил, что активация теперьь не требуется

 

после олистки кеша вышла икая ошибка Parse error: syntax error, unexpected T_ELSE in /var/www/qanter/data/www/anadex.ru/vqmod/vqcache/vq2-catalog_controller_product_category.php on line 507

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Здравствуйте!


Обращался к Вам за настройкой быстрогдействия моего сайи. Оплатил рилиту по WU.


Вы усиновили модуль кэш-менеджер и вносили какие-то правки по шаблону, но не писали о том что все догделали.


Сейчас всил вопрос в настройке модуля Блог от markimax. Он, пишет что у меня проблема с кешированием, Кешируется вся страница. Отключал в настройках  - не помогает. Контроллеры не отрабатывают. Сразу выводит из кеша всё   :(


Т е  рилиить нельзя нормально. Можете посмотреть?

Link to comment
Share on other sites


  • 1 month later...
  • 1 month later...
  • 1 month later...
Добрый гдень!
 
Купил модуль.
 
При усиновки модуля сайт падает в 500 ошибку, по логам с сервера  выдает 

2015/11/23 10:55:48 [error] 30701#0: *103 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected '$this' (T_VARIABLE), expecting function (T_FUNCTION) in /var/www/sn2city.ru/html/vqmod/vqcache/vq2-catalog_controller_common_header.php on line 249" while reading response header from upstream, client: 178.76.194.26, server: san2city.ru, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "san2city.ru"

 

Версия ostore 1.5.5.1.2

Link to comment
Share on other sites


 

Добрый гдень!
 
Купил модуль.
 
При усиновки модуля сайт падает в 500 ошибку, по логам с сервера  выдает 

2015/11/23 10:55:48 [error] 30701#0: *103 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected '$this' (T_VARIABLE), expecting function (T_FUNCTION) in /var/www/sn2city.ru/html/vqmod/vqcache/vq2-catalog_controller_common_header.php on line 249" while reading response header from upstream, client: 178.76.194.26, server: san2city.ru, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "san2city.ru"

 

Версия ostore 1.5.5.1.2

 

Сервер на nginx + php5-fpm

Link to comment
Share on other sites


файл контроллера header.php

была добавлена позиция header_bottom
В логах vqmod-a нет ошипотому чток, связанных с этим модулем
<?php   
class ControllerCommonHeader extends Controller {
	protected function index() {
		$this->data['title'] = $this->document->getTitle();
		
		if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
			$server = $this->config->get('config_ssl');
		} else {
			$server = $this->config->get('config_url');
		}

		$this->data['base'] = $server;
		$this->data['description'] = $this->document->getDescription();
		$this->data['keywords'] = $this->document->getKeywords();
		$this->data['links'] = $this->document->getLinks();	 
		$this->data['styles'] = $this->document->getStyles();
		$this->data['scripts'] = $this->document->getScripts();
		$this->data['lang'] = $this->language->get('code');
		$this->data['direction'] = $this->language->get('direction');
		$this->data['google_analytics'] = html_entity_decode($this->config->get('config_google_analytics'), ENT_QUOTES, 'UTF-8');
		$this->data['name'] = $this->config->get('config_name');
		$this->data['telephone'] = $this->config->get('config_telephone'); 
		
		if ($this->config->get('config_icon') && file_exists(DIR_IMAGE . $this->config->get('config_icon'))) {
			$this->data['icon'] = $server . 'image/' . $this->config->get('config_icon');
		} else {
			$this->data['icon'] = '';
		}
		
		if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
			$this->data['logo'] = $server . 'image/' . $this->config->get('config_logo');
		} else {
			$this->data['logo'] = '';

		}	
		$this->load->model('catalog/information');
		$this->data['informations'] = array();

		foreach ($this->model_catalog_information->getInformations() as $result) {
			if ($result['bottom']) {
				$this->data['informations'][] = array(
					'title' => $result['title'],
					'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])
				);
			}
    	}
		
		$this->language->load('common/header');
		$this->data['og_url'] = (isset($this->request->server['HTTPS']) ? HTTPS_SERVER : HTTP_SERVER) . substr($this->request->server['REQUEST_URI'], 1, (strlen($this->request->server['REQUEST_URI'])-1));
		$this->data['og_image'] = $this->document->getOgImage();
		
		$this->data['text_home'] = $this->language->get('text_home');
		$this->data['text_wishlist'] = sprintf($this->language->get('text_wishlist'), (isset($this->session->data['wishlist']) ? count($this->session->data['wishlist']) : 0));
        $this->data['text_compare'] = sprintf($this->language->get('text_compare'), (isset($this->session->data['compare']) ? count($this->session->data['compare']) : 0));
		$this->data['text_shopping_cart'] = $this->language->get('text_shopping_cart');
    	$this->data['text_search'] = $this->language->get('text_search');
		$this->data['text_welcome'] = sprintf($this->language->get('text_welcome'), $this->url->link('account/login', '', 'SSL'), $this->url->link('account/register', '', 'SSL'));
		$this->data['text_enter'] = sprintf($this->language->get('text_enter'), $this->url->link('account/login', '', 'SSL'));
		$this->data['text_logged'] = sprintf($this->language->get('text_logged'), $this->url->link('account/account', '', 'SSL'), $this->customer->getFirstName(), $this->url->link('account/logout', '', 'SSL'));
		$this->data['text_account'] = $this->language->get('text_account');
		$this->data['text_checkout'] = $this->language->get('text_checkout');
		$this->data['text_page'] = $this->language->get('text_page');

		$this->data['home'] = $this->url->link('common/home');
        $this->data['compare'] = $this->url->link('product/compare');
		$this->data['wishlist'] = $this->url->link('account/wishlist', '', 'SSL');
		$this->data['logged'] = $this->customer->isLogged();
		$this->data['account'] = $this->url->link('account/account', '', 'SSL');
		$this->data['shopping_cart'] = $this->url->link('checkout/cart');
		$this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');
		
		// Daniel's robot detector
		$status = true;
		
		if (isset($this->request->server['HTTP_USER_AGENT'])) {
			$robots = explode("\n", trim($this->config->get('config_robots')));

			foreach ($robots as $robot) {
				if ($robot && strpos($this->request->server['HTTP_USER_AGENT'], trim($robot)) !== false) {
					$status = false;

					break;
				}
			}
		}
		
		// A dirty hack to try to set a cookie for the multi-store feature
		$this->load->model('setting/store');
		
		$this->data['stores'] = array();
		
		if ($this->config->get('config_shared') && $status) {
			$this->data['stores'][] = $server . 'catalog/view/javascript/crossdomain.php?session_id=' . $this->session->getId();
			
			$stores = $this->model_setting_store->getStores();
					
			foreach ($stores as $store) {
				$this->data['stores'][] = $store['url'] . 'catalog/view/javascript/crossdomain.php?session_id=' . $this->session->getId();
			}
		}
				
		// Search		
		if (isset($this->request->get['search'])) {
			$this->data['search'] = $this->request->get['search'];
		} else {
			$this->data['search'] = '';
		}
		
		// Menu
		if (isset($this->request->get['path'])) {
			$parts = explode('_', (string)$this->request->get['path']);
		} else {
			$parts = array();
		}

		$this->load->model('catalog/category');
		
		$this->load->model('catalog/product');
		
		$this->data['categories'] = array();
					
		$categories = $this->model_catalog_category->getCategories(0);
		
		foreach ($categories as $category) {
			if ($category['top']) {
				// Level 2
				$children_data = array();
				
				$children = $this->model_catalog_category->getCategories($category['category_id']);
				
				foreach ($children as $child) {
					//Бугдем вылислять кол-во товаров в категориях только если это кол-во надо показывать
					if ($this->config->get('config_product_count')) {
						$data = array(
							'filter_category_id'  => $child['category_id'],
							'filter_sub_category' => true
						);
						
						$product_total = $this->model_catalog_product->getTotalProducts($data);
						$products = $this->model_catalog_product->getProducts($data);
						}
											
					$children_data[] = array(
						'name'  => $child['name']/* . ($this->config->get('config_product_count') ? ' (' . $count_quantity . ')' : '')*/,///// $product_total
						'href'  => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])	
					);	
					
				}
				
				// Level 1
                $this->data['categories'][] = array(
                    'name'     => $category['name'],
                    'children' => $children_data,
                    'column'   => $category['column'] ? $category['column'] : 1,
                    'href'     => $this->url->link('product/category', 'path=' . $category['category_id']),
                    'category_id' => $category['category_id']	// http://rb.labtodo.com/opencart-15x-show-current-category-in-menu
                );
            }
        }
        // http://rb.labtodo.com/opencart-15x-show-current-category-in-menu :: BEGIN
        if (isset($this->request->get['path'])) {
            $parts = explode('_', (string)$this->request->get['path']);
        } else {
            $parts = array();
        }
        if (isset($parts[0])) {
            $this->data['category_id'] = $parts[0];
        } else {
            $this->data['category_id'] = 0;
        }
		
		$this->children = array(
			'module/language',
			'module/currency',
			'module/cart',
			'common/header_bottom'
		);
				
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/header.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/common/header.tpl';
		} else {
			$this->template = 'default/template/common/header.tpl';
		}

		
    	$this->render();
	} 	
}
?>

 

Edited by bratkovsl
Link to comment
Share on other sites


// http://rb.labtodo.com/opencart-15x-show-current-category-in-menu :: BEGIN
if (isset($this->request->get['path'])) {
$parts = explode('_', (string)$this->request->get['path']);
} else {
$parts = array();
}
if (isset($parts[0])) {
$this->data['category_id'] = $parts[0];
} else {
$this->data['category_id'] = 0;
}

А это - НЛО ПРОЛЕТАЛО ?

Link to comment
Share on other sites

// http://rb.labtodo.com/opencart-15x-show-current-category-in-menu :: BEGIN
if (isset($this->request->get['path'])) {
$parts = explode('_', (string)$this->request->get['path']);
} else {
$parts = array();
}
if (isset($parts[0])) {
$this->data['category_id'] = $parts[0];
} else {
$this->data['category_id'] = 0;
}

А это - НЛО ПРОЛЕТАЛО ?

 

Закоментировал - ошибка осилась

 

2015/11/23 13:14:45 [error] 30701#0: *494 FastCGI sent in stderr: "PHP message: PHP Parse error:  syntax error, unexpected '$this' (T_VARIABLE), expecting function (T_FUNCTION) in /var/www/sn2city.ru/html/vqmod/vqcache/vq2-catalog_controller_common_header.php on line 249" while reading response header from upstream, client: 178.76.194.26, server: san2city.ru, request: "GET /index.php?route=product/category&path=239_236 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "san2city.ru"
Edited by bratkovsl
Link to comment
Share on other sites


Верните исходный родной код из дистрибутива Ocstore.

Посмотрите в результирующий код в папке vqmod/cache

И отилкиваясь от него, внесите те правки, которые вы хотели, исключая ошибки.

Не видя лога ошипотому чток, и tmp-файлов vqmodа,  без доступа к серверу помочь вам вряд ли полулится.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.