Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

copypaste

Користувачі
  
  • Публікації

    275
  • З нами

  • Відвідування

Повідомлення, опубліковані користувачем copypaste

  1. Все проще.

    Вот инструкция, с этого форума - https://opencartforum.com/topic/4602-%D1%81%D0%BB%D0%B0%D0%B9%D0%B4%D1%88%D0%BE%D1%83/page__p__29882__hl__%D1%81%D0%BB%D0%B0%D0%B9%D0%B4%D1%88%D0%BE%D1%83__fromsearch__1#entry29882

    Спасибо!

    Единственное, управлять загрузкой картинок в слайдере, нужно в ява-скрипте, как я понимаю?

    А какие значения там менять и какой из скриптов за слайдер отвечает?

  2. Доброго дня.

    Хочу 404 оформить - not_found.tpl

    <?php echo $header; ?>

    <div class="container"><?php echo $column_left; ?><?php echo $column_right; ?>

    <div id="content"><?php echo $content_top; ?>

    <div class="breadcrumb">

    <?php foreach ($breadcrumbs as $breadcrumb) { ?>

    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>

    <?php } ?>

    </div>

    <h1><?php echo $heading_title; ?></h1>

    <div class="content"><?php echo $text_error; ?></div>

    <div class="buttons">

    <div class="right"><a href="<?php echo $continue; ?>" class="button"><span><?php echo $button_continue; ?></span></a></div>

    </div>

    <?php echo $content_bottom; ?></div>

    </div>

    <?php echo $footer; ?>

    Я так понимаю, этот шаблон относится к группе "default".

    Но модуль во всех файлах этой группы не нужен.

    Может быть, как-то напрямую коды модулей вставлять?

    Приведите пример, пожалуйста.

  3. Подскажите, какое значение в stylesheet.css найти, поменять или добавить, чтобы все статьи на сайте имели более крупный шрифт.

    Описания к товарам нормальным шрифтом идут, а вот статьи...

  4. Версия 1.5.1.1

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

    Если заменить, некорректно отображается страничка. А именно, на главной странице сайта пропадает все, что находится в теле контента под меню, т.е. в верхней его части.

    Вот стандартный catalog/controller/common/header.php

    <?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'))) {
    			$this->data['base'] = $this->config->get('config_ssl');
    		} else {
    			$this->data['base'] = $this->config->get('config_url');
    		}
    		
    		$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->language->load('common/header');
    		
    		if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
    			$server = HTTPS_IMAGE;
    		} else {
    			$server = HTTP_IMAGE;
    		}	
    				
    		if ($this->config->get('config_icon') && file_exists(DIR_IMAGE . $this->config->get('config_icon'))) {
    			$this->data['icon'] = $server . $this->config->get('config_icon');
    		} else {
    			$this->data['icon'] = '';
    		}
    		
    		$this->data['name'] = $this->config->get('config_name');
    				
    		if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
    			$this->data['logo'] = $server . $this->config->get('config_logo');
    		} else {
    			$this->data['logo'] = '';
    		}
    		
    		// Calculate Totals
    		$total_data = array();					
    		$total = 0;
    		$taxes = $this->cart->getTaxes();
    		
    		if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {						 
    			$this->load->model('setting/extension');
    			
    			$sort_order = array(); 
    			
    			$results = $this->model_setting_extension->getExtensions('total');
    			
    			foreach ($results as $key => $value) {
    				$sort_order[$key] = $this->config->get($value['code'] . '_sort_order');
    			}
    			
    			array_multisort($sort_order, SORT_ASC, $results);
    			
    			foreach ($results as $result) {
    				if ($this->config->get($result['code'] . '_status')) {
    					$this->load->model('total/' . $result['code']);
    		
    					$this->{'model_total_' . $result['code']}->getTotal($total_data, $total, $taxes);
    				}
    			}
    		}
    		
    		$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_cart'] = $this->language->get('text_cart');
    		$this->data['text_items'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
        	$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_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_language'] = $this->language->get('text_language');
        	$this->data['text_currency'] = $this->language->get('text_currency');
    				
    		$this->data['home'] = $this->url->link('common/home');
    		$this->data['contact'] = $this->url->link('information/contact');
    		$this->data['wishlist'] = $this->url->link('account/wishlist');
    		$this->data['logged'] = $this->customer->isLogged();
    		$this->data['account'] = $this->url->link('account/account', '', 'SSL');
    		$this->data['cart'] = $this->url->link('checkout/cart');
    		$this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');
    		
    		if (isset($this->request->get['filter_name'])) {
    			$this->data['filter_name'] = $this->request->get['filter_name'];
    		} else {
    			$this->data['filter_name'] = '';
    		}
    		
    		$this->data['action'] = $this->url->link('common/home');
    
    		if (!isset($this->request->get['route'])) {
    			$this->data['redirect'] = $this->url->link('common/home');
    		} else {
    			$data = $this->request->get;
    			
    			unset($data['_route_']);
    			
    			$route = $data['route'];
    			
    			unset($data['route']);
    			
    			$url = '';
    			
    			if ($data) {
    				$url = '&' . urldecode(http_build_query($data));
    			}			
    			
    			$this->data['redirect'] = $this->url->link($route, $url);
    		}
    
        	if (($this->request->server['REQUEST_METHOD'] == 'POST') && isset($this->request->post['language_code'])) {
    			$this->session->data['language'] = $this->request->post['language_code'];
    		
    			if (isset($this->request->post['redirect'])) {
    				$this->redirect($this->request->post['redirect']);
    			} else {
    				$this->redirect($this->url->link('common/home'));
    			}
        	}		
    						
    		$this->data['language_code'] = $this->session->data['language'];
    		
    		$this->load->model('localisation/language');
    		
    		$this->data['languages'] = array();
    		
    		$results = $this->model_localisation_language->getLanguages();
    		
    		foreach ($results as $result) {
    			if ($result['status']) {
    				$this->data['languages'][] = array(
    					'name'  => $result['name'],
    					'code'  => $result['code'],
    					'image' => $result['image']
    				);	
    			}
    		}
    
    		if (($this->request->server['REQUEST_METHOD'] == 'POST') && isset($this->request->post['currency_code'])) {
          		$this->currency->set($this->request->post['currency_code']);
    			
    			unset($this->session->data['shipping_methods']);
    			unset($this->session->data['shipping_method']);
    				
    			if (isset($this->request->post['redirect'])) {
    				$this->redirect($this->request->post['redirect']);
    			} else {
    				$this->redirect($this->url->link('common/home'));
    			}
       		}
    						
    		$this->data['currency_code'] = $this->currency->getCode(); 
    		
    		$this->load->model('localisation/currency');
    		 
    		 $this->data['currencies'] = array();
    		 
    		$results = $this->model_localisation_currency->getCurrencies();	
    		
    		foreach ($results as $result) {
    			if ($result['status']) {
       				$this->data['currencies'][] = array(
    					'title'        => $result['title'],
    					'code'         => $result['code'],
    					'symbol_left'  => $result['symbol_left'],
    					'symbol_right' => $result['symbol_right']				
    				);
    			}
    		}
    		
    		// Menu
    		$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']) {
    				$children_data = array();
    				
    				$children = $this->model_catalog_category->getCategories($category['category_id']);
    				
    				foreach ($children as $child) {
    					$data = array(
    						'filter_category_id'  => $child['category_id'],
    						'filter_sub_category' => true	
    					);		
    						
    					$product_total = $this->model_catalog_product->getTotalProducts($data);
    									
    					$children_data[] = array(
    						'name'  => $child['name'] . ' (' . $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'])
    				);
    			}
    		}
    		
    		$this->load->model('design/layout');
    		$this->load->model('catalog/category');
    		$this->load->model('catalog/product');
    		$this->load->model('catalog/information');
    		
    		if (isset($this->request->get['route'])) {
    			$route = $this->request->get['route'];
    		} else {
    			$route = 'common/home';
    		}
    		
    		$layout_id = 0;
    		
    		if (substr($route, 0, 16) == 'product/category' && isset($this->request->get['path'])) {
    			$path = explode('_', (string)$this->request->get['path']);
    				
    			$layout_id = $this->model_catalog_category->getCategoryLayoutId(end($path));			
    		}
    		
    		if (substr($route, 0, 15) == 'product/product' && isset($this->request->get['product_id'])) {
    			$layout_id = $this->model_catalog_product->getProductLayoutId($this->request->get['product_id']);
    		}
    		
    		if (substr($route, 0, 23) == 'information/information' && isset($this->request->get['information_id'])) {
    			$layout_id = $this->model_catalog_information->getInformationLayoutId($this->request->get['information_id']);
    		}
    		
    		if (!$layout_id) {
    			$layout_id = $this->model_design_layout->getLayout($route);
    		}
    				
    		if (!$layout_id) {
    			$layout_id = $this->config->get('config_layout_id');
    		}
    
    		$module_data = array();
    		
    		$this->load->model('setting/extension');
    		
    		$extensions = $this->model_setting_extension->getExtensions('module');		
    		
    		foreach ($extensions as $extension) {
    			$modules = $this->config->get($extension['code'] . '_module');
    			
    			if ($modules) {
    				foreach ($modules as $module) {
    					if ($module['layout_id'] == $layout_id && $module['position'] == 'content_header' && $module['status']) {
    						$module_data[] = array(
    							'code'       => $extension['code'],
    							'setting'    => $module,
    							'sort_order' => $module['sort_order']
    						);				
    					}
    				}
    			}
    		}
    		
    		$sort_order = array(); 
    	  
    		foreach ($module_data as $key => $value) {
          		$sort_order[$key] = $value['sort_order'];
        	}
    		
    		array_multisort($sort_order, SORT_ASC, $module_data);
    		
    		$this->data['modules'] = array();
    		
    		foreach ($module_data as $module) {
    			$module = $this->getChild('module/' . $module['code'], $module['setting']);
    			
    			if ($module) {
    				$this->data['modules'][] = $module;
    			}
    		}
    				
    		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();
    	} 	
    }
    ?>

    А это тот, который идет вместе с дополнением.

    <?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'))) {
    			$this->data['base'] = $this->config->get('config_ssl');
    		} else {
    			$this->data['base'] = $this->config->get('config_url');
    		}
    		
    		$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->language->load('common/header');
    		
    		if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
    			$server = HTTPS_IMAGE;
    		} else {
    			$server = HTTP_IMAGE;
    		}	
    				
    		if ($this->config->get('config_icon') && file_exists(DIR_IMAGE . $this->config->get('config_icon'))) {
    			$this->data['icon'] = $server . $this->config->get('config_icon');
    		} else {
    			$this->data['icon'] = '';
    		}
    		
    		$this->data['name'] = $this->config->get('config_name');
    				
    		if ($this->config->get('config_logo') && file_exists(DIR_IMAGE . $this->config->get('config_logo'))) {
    			$this->data['logo'] = $server . $this->config->get('config_logo');
    		} else {
    			$this->data['logo'] = '';
    		}
    		
    		// Calculate Totals
    		$total_data = array();					
    		$total = 0;
    		$taxes = $this->cart->getTaxes();
    		
    		if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {						 
    			$this->load->model('setting/extension');
    			
    			$sort_order = array(); 
    			
    			$results = $this->model_setting_extension->getExtensions('total');
    			
    			foreach ($results as $key => $value) {
    				$sort_order[$key] = $this->config->get($value['code'] . '_sort_order');
    			}
    			
    			array_multisort($sort_order, SORT_ASC, $results);
    			
    			foreach ($results as $result) {
    				if ($this->config->get($result['code'] . '_status')) {
    					$this->load->model('total/' . $result['code']);
    		
    					$this->{'model_total_' . $result['code']}->getTotal($total_data, $total, $taxes);
    				}
    			}
    		}
    		
    		$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_cart'] = $this->language->get('text_cart');
    		$this->data['text_items'] = sprintf($this->language->get('text_items'), $this->cart->countProducts() + (isset($this->session->data['vouchers']) ? count($this->session->data['vouchers']) : 0), $this->currency->format($total));
        	$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_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_language'] = $this->language->get('text_language');
        	$this->data['text_currency'] = $this->language->get('text_currency');
    				
    		$this->data['home'] = $this->url->link('common/home');
    		$this->data['wishlist'] = $this->url->link('account/wishlist');
    		$this->data['logged'] = $this->customer->isLogged();
    		$this->data['account'] = $this->url->link('account/account', '', 'SSL');
    		$this->data['cart'] = $this->url->link('checkout/cart');
    		$this->data['checkout'] = $this->url->link('checkout/checkout', '', 'SSL');
    		
    		if (isset($this->request->get['filter_name'])) {
    			$this->data['filter_name'] = $this->request->get['filter_name'];
    		} else {
    			$this->data['filter_name'] = '';
    		}
    		
    		$this->data['action'] = $this->url->link('common/home');
    
    		if (!isset($this->request->get['route'])) {
    			$this->data['redirect'] = $this->url->link('common/home');
    		} else {
    			$data = $this->request->get;
    			
    			unset($data['_route_']);
    			
    			$route = $data['route'];
    			
    			unset($data['route']);
    			
    			$url = '';
    			
    			if ($data) {
    				$url = '&' . urldecode(http_build_query($data));
    			}			
    			
    			$this->data['redirect'] = $this->url->link($route, $url);
    		}
    
        	if (($this->request->server['REQUEST_METHOD'] == 'POST') && isset($this->request->post['language_code'])) {
    			$this->session->data['language'] = $this->request->post['language_code'];
    		
    			if (isset($this->request->post['redirect'])) {
    				$this->redirect($this->request->post['redirect']);
    			} else {
    				$this->redirect($this->url->link('common/home'));
    			}
        	}		
    						
    		$this->data['language_code'] = $this->session->data['language'];
    		
    		$this->load->model('localisation/language');
    		
    		$this->data['languages'] = array();
    		
    		$results = $this->model_localisation_language->getLanguages();
    		
    		foreach ($results as $result) {
    			if ($result['status']) {
    				$this->data['languages'][] = array(
    					'name'  => $result['name'],
    					'code'  => $result['code'],
    					'image' => $result['image']
    				);	
    			}
    		}
    
    		if (($this->request->server['REQUEST_METHOD'] == 'POST') && isset($this->request->post['currency_code'])) {
          		$this->currency->set($this->request->post['currency_code']);
    			
    			unset($this->session->data['shipping_methods']);
    			unset($this->session->data['shipping_method']);
    				
    			if (isset($this->request->post['redirect'])) {
    				$this->redirect($this->request->post['redirect']);
    			} else {
    				$this->redirect($this->url->link('common/home'));
    			}
       		}
    						
    		$this->data['currency_code'] = $this->currency->getCode(); 
    		
    		$this->load->model('localisation/currency');
    		 
    		 $this->data['currencies'] = array();
    		 
    		$results = $this->model_localisation_currency->getCurrencies();	
    		
    		foreach ($results as $result) {
    			if ($result['status']) {
       				$this->data['currencies'][] = array(
    					'title'        => $result['title'],
    					'code'         => $result['code'],
    					'symbol_left'  => $result['symbol_left'],
    					'symbol_right' => $result['symbol_right']				
    				);
    			}
    		}
    		
    		// Menu
    		$news_article_menu = array();
    		$news_include_menu = array();
    		$news_include_gallery = array();
    		if($this->config->get('news_version')){
    			$this->load->model('news/article');
    			$news_articles = $this->model_news_article->getArticleTopmenu();
    			if($news_articles){
    				foreach($news_articles as $news_article)
    				{
    					$news_article_menu[] = array(
    						'name' => $news_article['news_titles'],
    						'children' => false,
    						'column' => 0,
    						'href' => $this->url->link('news/article', 'news_id='.(int)$news_article['news_id']),
    						'order' => $news_article['news_sort_order']
    					);
    				}
    			}
    			
    			
    			$this->load->model('news/category');
    			$news_categories = $this->model_news_category->getNewsCategories(0);
    			foreach($news_categories as $news_category)
    				{
    					if($news_category['news_category_top'])
    					{
    						$news_category_children_data = array();
    						$news_category_children = $this->model_news_category->getNewsCategories($news_category['news_category_id']);
    						foreach ($news_category_children as $child) {
    											
    							$news_category_children_data[] = array(
    								'name'  => $child['news_category_name'] ,
    								'href'  => $this->url->link('news/category', 'catid=' . $news_category['news_category_id'] . '_' . $child['news_category_id'])	
    							);					
    						}
    						// Level 1
    						$news_include_menu[] = array(
    							'name'     => $news_category['news_category_name'],
    							'children' => $news_category_children_data,
    							'column'   => $news_category['news_category_column'] ? $news_category['news_category_column'] : 1,
    							'href'     => $this->url->link('news/category', 'catid=' . $news_category['news_category_id']),
    							'order'    => $news_category['news_category_sort_order']
    						);
    					}
    				}
    			}
    		
    		
    		$this->load->model('catalog/category');
    		$this->load->model('catalog/product');
    		
    		$categories_menu = array();
    					
    		$categories = $this->model_catalog_category->getCategories(0);
    		
    		foreach ($categories as $category) {
    			if ($category['top']) {
    				$children_data = array();
    				
    				$children = $this->model_catalog_category->getCategories($category['category_id']);
    				
    				foreach ($children as $child) {
    					$data = array(
    						'filter_category_id'  => $child['category_id'],
    						'filter_sub_category' => true	
    					);		
    						
    					$product_total = $this->model_catalog_product->getTotalProducts($data);
    									
    					$children_data[] = array(
    						'name'  => $child['name'] . ' (' . $product_total . ')',
    						'href'  => $this->url->link('product/category', 'path=' . $category['category_id'] . '_' . $child['category_id'])	
    					);					
    				}
    				
    				// Level 1
    				$categories_menu[] = array(
    					'name'     => $category['name'],
    					'children' => $children_data,
    					'column'   => $category['column'] ? $category['column'] : 1,
    					'href'     => $this->url->link('product/category', 'path=' . $category['category_id']),
    					'order'    => $category['sort_order']
    				);
    			}
    		}
    		//gallery
    		if($this->config->get('news_config_gallerytop') && ($this->config->get('news_config_gallerytop') == 1)){
    			$news_include_gallery[] = array(
    				'name'     => $this->language->get('text_gallery'),
    				'children' => false,
    				'column'   => 0,
    				'href'     => $this->url->link('news/gallery'),
    				'order'    => $this->config->get('news_config_gallery_order')
    			);
    		}
    		$datamenu = array_merge($categories_menu,$news_include_menu,$news_article_menu,$news_include_gallery);
    		
    		function menusort($left,$right){
    			if($left['order'] == $right['order']) return 0;
    			return $left['order'] < $right['order'] ? -1 : 1 ;
    		} 		
    		usort($datamenu,'menusort');
    		$this->data['categories'] = $datamenu;	
    		//end assign menu
    		
    				
    		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();
    	}
    		
    }
    ?>

    Нужно внести в стандартный изменения, чтобы функции меню дополнения работали корректно. Но мне самому не справиться. Помогите, пожалуйста.

  5. Проще в файле system/library/response.php, метод output(), в самом начале метода добавить строку

    if (!defined('HTTP_CATALOG')) $this->output = str_replace('index.php?route=common/home', '', $this->output);
    и index.php?route=common/home будет вырезан везде.

    Не могли бы вы уточнить, куда именно вставить эту строку?

    У меня код такой:

    <?php
    final class Response {
    	private $headers = array(); 
    	private $level = 0;
    	private $output;
    	
    	public function addHeader($header) {
    		$this->headers[] = $header;
    	}
    
    	public function redirect($url) {
    		header('Location: ' . $url);
    		exit;
    	}
    	
    	public function setCompression($level) {
    		$this->level = $level;
    	}
    		
    	public function setOutput($output) {
    		$this->output = $output;
    	}
    
    	private function compress($data, $level = 0) {
    		if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false)) {
    			$encoding = 'gzip';
    		} 
    
    		if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false)) {
    			$encoding = 'x-gzip';
    		}
    
    		if (!isset($encoding)) {
    			return $data;
    		}
    
    		if (!extension_loaded('zlib') || ini_get('zlib.output_compression')) {
    			return $data;
    		}
    
    		if (headers_sent()) {
    			return $data;
    		}
    
    		if (connection_status()) { 
    			return $data;
    		}
    		
    		$this->addHeader('Content-Encoding: ' . $encoding);
    
    		return gzencode($data, (int)$level);
    	}
    
    	public function output() {
    		if ($this->output) {
    			if ($this->level) {
    				$ouput = $this->compress($this->output, $this->level);
    			} else {
    				$ouput = $this->output;
    			}	
    				
    			if (!headers_sent()) {
    				foreach ($this->headers as $header) {
    					header($header, true);
    				}
    			}
    			
    			echo $ouput;
    		}
    	}
    }
    ?>
  6. Не в Система->Настройка->Локализация нужно смотреть, а в Система->Локализация->Валюта

    Там выпадающие списки...

    Спасибо, помогло.

    Там же нашел сотни лишних стран, только загрязняющих списки, от Австралии, до Чада.

    А тысячи регионов, вообще убили. Кто это локализовывал? Ад. И все в топку.

  7. Не выходит что-то.

    Вот эту строку, для замены, в коде не найти

    imagecopy($this->image, $watermark, $watermark_pos_x, $watermark_pos_y, 0, 0, 120, 40);
    Дримвьювером не нашел.

    Подправить этот модуль, с комментариями в "ридми" и в коде (в месте позиционирования) можно попросить?

  8. Для многих магазинов, использующих точки самовывоза подрядчика, эта услуга не бесплатна.

    Хотелось бы, иметь возможность, эти расходы переложить на покупателя.

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

  9. Мне кажется, разумнее, перенести блок для заполнения адреса пользователем, после опций выбора метода доставки.

    И если выбран "сомовывоз", этот блок, вообще, не нужно заполнять.

    Как это реализовать?

    • +1 1
  10. Тоже ищу.

    Требуется чтобы было:

    1. Категории

    2. Метки

    3. ЧПУ

    4. Комментарии (желательно, чтобы зарегистрированные писали под своим именем и имели возможность искать свои комменты из личного кабинета)

    Опционально: редактирование мета-данных.

    1.5.1.1

  11. По умолчанию, в системе установлен русский, однако, при создании карточки товара или карточки категории, есть вкладка "english"

    Изображение

    И ее нельзя игнорировать, если не заполнить "название товара", карточка просто не сохранится. При том, что образцы карточек, которsе уже есть в демо не содержат заголовков на вкладке "english". Но попытаться отредактировать и не поставить туда заголовок, система выдаст ошибку "не все поля правильно заполнены".

    То же, и во многих других модулях, например, "квитанция от Сбербанка". Помимо русского, требуется везде вводить данные и для английской версии.

    Как избавиться от проблемы?

    Спасибо.

  12. Это для того, чтобы watermark находился посередине. У себя я его размести справа внизу с небольшим отступом от края справа и снизу. Для этого нужно в файле system/library/image.php найти

    case 'bottomright':
                    $watermark_pos_x = $this->info['width'] - $watermark_width;
                    $watermark_pos_y = $this->info['height'] - $watermark_height;
                    break;

    и заменить на

    case 'bottomright':
                    $watermark_pos_x = $this->info['width'] - $watermark_width - 20;
                    $watermark_pos_y = $this->info['height'] - $watermark_height - 40;
                    break;

    Цифрами можно менять отступ

    Спасибо.

    А если справа сверху разместить, как правильно править код?

    Я так понимаю ,это вот этот кусок?

    case 'topright':
                    $watermark_pos_x = $this->info['width'] - $watermark_width;
                    $watermark_pos_y = 0;
                    break;
  13. Здесь есть море модулей с функцией добавления поля товару. Например

    Адаптируется под свои нужды в полпинка.

    Спасибо, но я бы от помощи не отказался.

    Чтобы и стоимость от поставщика и артикул от поставщика были. На версию 1.5.1

  14. Значит кроме этой инструкции были ещё файлы. И там были папки admin/language/english и, возможно, catalog/language/english.

    Которые надо скопировать рядом (продублировать) в russian. И залить эти "russian" на сервер. При желании - перевести.

    Файлы были конечно, и я даже в папку russian записал, то, что в english было. Но сейчас перезалил и вроде этой ошибки больше нет, зато теперь есть другая :)

    Нет таблицы в базе данных

    Notice: Error: Table 'pXXXXX_alldrag.order' doesn't exist
    Error No: 1146
    select count(order_id) as total from `order` o where o.order_status_id > '0' in /home/XXXXX/www/domain.ru/system/database/mysql.php on line 49
    Странной таблицы ей не хватает ('pXXXXX_alldrag.order'), почему-то не с тем префиксом, который я установил для всех таблиц, он должен быть "oc", почему-то имя базы данных включено в имя таблицы.

    По идее, таблица должна называться "ocorder".

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.