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

senty

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

    158
  • З нами

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

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

  1. Доброго времени суток!

    В шаблонах Opancart исп. XHTML. Но на счётчик HotLog'a валидатор ругается. На сайте убрал временно счётчик и отправил вопрос в support HotLog'a, мб посоветую что.

    Валидатор ругается на подобное:

    language="javascript"
    В инете натыкался на конструкцию
    CDATA
    , но при её использовании счётчик пропадает.

    <!-- HotLog -->
    <script type="text/javascript" language="javascript">
    hotlog_js="1.0"; hotlog_r=""+Math.random()+"&s=2123917&im=69&r="+
    escape(document.referrer)+"&pg="+escape(window.location.href);
    </script>
    <script type="text/javascript" language="javascript1.1">
    hotlog_js="1.1"; hotlog_r+="&j="+(navigator.javaEnabled()?"Y":"N");
    </script>
    <script type="text/javascript" language="javascript1.2">
    hotlog_js="1.2"; hotlog_r+="&wh="+screen.width+"x"+screen.height+"&px="+
    (((navigator.appName.substring(0,3)=="Mic"))?screen.colorDepth:screen.pixelDepth);
    </script>
    <script type="text/javascript" language="javascript1.3">
    hotlog_js="1.3";
    </script>
    <script type="text/javascript" language="javascript">
    hotlog_r+="&js="+hotlog_js;
    document.write('<a href="http://click.hotlog.ru/?2123917" target="_blank"><img '+
    'src="http://hit37.hotlog.ru/cgi-bin/hotlog/count?'+
    hotlog_r+'" border="0" width="88" height="31" alt="HotLog"><\/a>');
    </script>
    <noscript>
    <a href="http://click.hotlog.ru/?2123917" target="_blank"><img
    src="http://hit37.hotlog.ru/cgi-bin/hotlog/count?s=2123917&im=69" border="0"
    width="88" height="31" alt="HotLog"></a>
    </noscript>
    <!-- /HotLog -->
  2. С помощью Fix305 пришел к такому виду:

    <?php
    class ControllerExportYml extends Controller {
    
    	private $eof = "\n";
    
    	public function index() {
    		if ($this->config->get('yandex_market_status')) {
    			$output  = '<?xml version="1.0" encoding="utf-8" ?>';
    			$output .= '<!DOCTYPE yml_catalog SYSTEM "shops.dtd">';
    			$output .= '<yml_catalog date="' . date("Y-m-d H:m") . '">';
    			$output .= '<shop>'  . "\n";
    			$output .= '<name>MestoDetok.net</name>';
    			$output .= '<company>' . $this->config->get('config_meta_description') . '</company>';
    			$output .= '<url>' . HTTP_SERVER . '</url>'. "\n";
    
    			// Перечесляем валюту магазина
    			// TODO: Добавить возможность настраивать проценты.
    			$output .= '<currencies>';
    			$output .= '<currency id="RUR" rate="1"/>';
    			$output .= '</currencies>';
    
    			// Категории товаров
    			$this->load->model('catalog/category');
    			$output .= '<categories>';
    			$output .= $this->getCat();
    			$output .= '</categories>';
                $this->load->model('tool/seo_url');
    			// Товарные позиции
    			$this->load->model('catalog/product');
    			$this->load->model('tool/image');
    			$output .= '<offers>';
    
    			$products = $this->model_catalog_product->getProducts();
    			foreach ($products as $product) {
    				$output .= '<offer id="'.$product['product_id'].'" type="vendor.model" available="true" bid="13">' . $this->eof;
    				$output .= '<url>'.($this->model_tool_seo_url->rewrite(HTTP_SERVER . 'index.php?route=product/product&product_id=' . $product['product_id'])).'</url>';
    				$output .= '<price>' . $this->tax->calculate($product['price'], $product['tax_class_id']) . '</price>';
    				$output .= '<currencyId>RUR</currencyId>';
    
    				// Определяем категорию для товара
    				$categories = $this->model_catalog_product->getCategories($product['product_id']);
    				$output .= '<categoryId>'.$categories[0]['category_id'].'</categoryId>';
    
    				// Определеяме изображение
    				if ($product['image']) {
    					$output .= '<picture>' . $this->model_tool_image->resize($product['image'], 500, 500) . '</picture>';
    				} else {
    					$output .= '<picture>' . $this->model_tool_image->resize('no_image.jpg', 500, 500) . '</picture>';
    				}
    
    				$output .= '<delivery> true </delivery>';
    				if (($product['price'])>1000) {
    				$output .= '<local_delivery_cost>0</local_delivery_cost>';
    				} else {
    				$output .= '<local_delivery_cost>200</local_delivery_cost>';
    				}
    			//	$output .= '<typePrefix>  </typePrefix>';
    				$output .= '<vendor>' . $product['manufacturer'] . '</vendor>';
    			//	$output .= '<vendorCode>  </vendorCode>';
    				$output .= '<model>'.$product['model'].'</model>';
    				$output .= '<description>'.$product['description'].'</description>';
    				$output .= '<manufacturer_warranty>true</manufacturer_warranty>';
    				$output .= '</offer>';
    			}
    
    			$output .= '</offers>';
    			$output .= '</shop>';
    			$output .= '</yml_catalog>';
    			$this->response->addHeader('Content-Type: application/xml');
    			$this->response->setOutput($output);
    		}
    	}
    
    	// Возвращает массив категорий
    	protected function getCat($pi=0) {
    		$categories = $this->model_catalog_category->getCategories($pi);
    		$out = '';
    
    		foreach ($categories as $category) {
    			$out .= '<category id="'.$category['category_id'].'"';
    			if($pi != 0) $out .= ' parentId="'.$pi.'"';
    			$out .='>'.$category['name'].'</category>';
    			if($e =  $this->getCat($category['category_id'])) $out .= $e;
    		}
    		return $out;
    	}
    }
    ?>
    • +1 1
  3. Доброго времени суток.

    Модуль импорта товара в ЯМ работает, это хорошо =)

    Но ссылки в нём выглядят так:

    В яндекс из-за этого попадает такая ссылка:

    Которая идентична:

    Может кто подсказать, как сделать ЧПУ ссылки в ЯндексМаркет?

  4. http://www.opencart.com/index.php?route=extension/extension/info&extension_id=570&path=8&page=10

    Собственно кто настраивал? Делал всё по инструкции но не понял, где производить изменения?

    post-3682-0-98698200-1296756514_thumb.jpg

    post-3682-0-25577300-1296756523_thumb.jpg

  5. Доброго времени суток!

    Не прошу конечно конкретно готового решения, а нуждаюсь лишь в помощи - подтолкнуть так сказать в нужном направлении =Ъ

    2 интернет магазина - идентичный товар, хочется лишь чтоб цены товара обновлялись сразу в двух магазинах через админку =Ъ

    Где копать? Пираты есть?! =Ъ

  6. При выгрузке в ЯМ остаются теги « и т.п.

    Вопрос: как удалить их? =]

    Это нормально, что в файле импорта для ЯМ ссылки на товар не ЧПУ, хотя они вкл.?

    Или подскажите как заюзать это:

    function getTextFromHTML($htmlText)
    {
        $search = array ("'<script[^>]*?>.*?</script>'si",  // Remove javaScript 
                 "'<style[^>]*?>.*?</style>'si",  // Remove styles 
                 "'<xml[^>]*?>.*?</xml>'si",  // Remove xml tags 
                 "'<[\/\!]*?[^<>]*?>'si",           // Remove HTML-tags 
                 "'([\r\n])[\s]+'",                 // Remove spaces
                 "'&(quot|#34);'i",                 // Replace HTML special chars
                 "'&(amp|#38);'i", 
                 "'&(lt|#60);'i", 
                 "'&(gt|#62);'i", 
                 "'&(nbsp|#160);'i", 
                 "'&(iexcl|#161);'i", 
                 "'&(cent|#162);'i", 
                 "'&(pound|#163);'i", 
                 "'&(copy|#169);'i", 
                 "'(\d+);'e");                    // write as php
    
        $replace = array ("", 
                          "", 
                          "",
                          "",
                          "\\1", 
                          "\"", 
                          "&", 
                          "<", 
                          ">", 
                          " ", 
                          chr(161), 
                          chr(162), 
                          chr(163), 
                          chr(169), 
                          "chr(\\1)"); 
        
        return preg_replace($search, $replace, $htmlText);
    }
    • +1 1
  7. Доброго времени суток.

    Долго время работал с другими CMS и в них была возможность указать title для каждой страницы вручную.

    В openCart подобного не нашел - title берутся исходя из названия товара. На форуме находил решение, но оно не актуально, т.к. если переходим на товар с Витрины Последних добавленных товаров title уже другой.

    Собственно кому не трудно, просьба, опешите процесс:

    1. Как добавить в Панель администрирования поле title.

    2. Образовать для него переменную или что-то типа этого.

    3. Вывести эти title для страниц.

    Заранее спасибо за любую оказанную помощь =]

  8. RewriteCond %{REQUEST_URI} !.html
    RewriteRule   ^/(.*)/$  http://%{HTTP_HOST}/$1.html [R=301,L]
    Если ЧПУ включены.

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

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

Important Information

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