This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
private:koding:hostcms:modules:shop:useful:optimizacija [30.03.17 в 17:41] reval-31_mail.ru |
private:koding:hostcms:modules:shop:useful:optimizacija [27.10.17 в 09:31] (current) maximzasorin_gmail.com |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Оптимизация ====== | ====== Оптимизация ====== | ||
+ | ===== Сократить размер xml ===== | ||
+ | |||
+ | Необходимо посмотреть на xml файл и найти там теги которые не используются. Отключаем их везде, либо только там где они не используются. | ||
+ | |||
+ | Можно установить ''$Shop_Controller_Show->viewed(FALSE)'' если на данной странице не используются просмотренные товары. По умолчанию включено. | ||
+ | |||
+ | Убрать из xml список дополнительных свойств товаров и групп, по умолчанию они включены: ''$Shop_Controller_Show->itemsPropertiesList(FALSE)'', ''$Shop_Controller_Show->groupsPropertiesList(FALSE)''. Можно передать этим методам массив с идентификаторами тех дополнительных свойств, которые необходимо выводить в xml. | ||
+ | |||
+ | ''$Shop_Controller_Show->groupsProperties()'' и ''$Shop_Controller_Show->itemsProperties()'' значения дополнительных свойств товаров и групп, они по умолчанию выключены, но если необходимо выводить их в xml то лучше передавать в массив идентификаторы дополнительных свойств, значения которых необходимо вывести. | ||
+ | |||
+ | ''$Shop_Controller_Show->associatedItems()'', сопутствующие товары, если включены и не используются, лучше выключить. По умолчанию выключены. | ||
+ | |||
+ | ''$Shop_Controller_Show->comments()'', комментарии. Есть смысл отключать там где не используются. | ||
+ | |||
+ | ''$Shop_Controller_Show->groupsMode()'' по умолчанию выставлен режим "tree" (показывать дерево групп и все группы на текущем уровне), отключить там где не используются группы. | ||
+ | |||
+ | Можно запретить передавать в генерируемый xml теги товаров и групп используя ''$Shop_Controller_Show->itemsForbiddenTags()'' и ''$Shop_Controller_Show->groupsForbiddenTags()''. | ||
+ | |||
+ | **Пример запрещённых тегов товаров:** | ||
+ | |||
>itemsForbiddenTags(array('shortcut_id','shop_tax_id','shop_seller_id','shop_currency_id','shop_id','shop_producer_id','shop_measure_id','type','vendorcode','weight','siteuser_group_id','yandex_market_sales_notes','datetime','start_datetime','description','text','seo_title','seo_description','seo_keywords','indexing','image_small_height','image_small_width','image_large_height','image_large_width','yandex_market','yandex_market_bid','yandex_market_cid','manufacturer_warranty','country_of_origin','user_id','guid','showed',)) | >itemsForbiddenTags(array('shortcut_id','shop_tax_id','shop_seller_id','shop_currency_id','shop_id','shop_producer_id','shop_measure_id','type','vendorcode','weight','siteuser_group_id','yandex_market_sales_notes','datetime','start_datetime','description','text','seo_title','seo_description','seo_keywords','indexing','image_small_height','image_small_width','image_large_height','image_large_width','yandex_market','yandex_market_bid','yandex_market_cid','manufacturer_warranty','country_of_origin','user_id','guid','showed',)) | ||
- | **! Использовать код нужно аккуратно, так как свойства из приведенного выше массива могут использовать в XSL-шаблонах.** | + | **Ещё вариант:** |
+ | |||
+ | >itemsForbiddenTags(array('text','shortcut_id','shop_tax_id','shop_seller_id','shop_group_id','shop_currency_id','shop_id','shop_producer_id','shop_measure_id','type','marking','vendorcode','description','deleted','length','weight','active','siteuser_group_id','sorting','path','siteuser_id','modification_id','guid','showed','manufacturer_warranty','country_of_origin','yandex_market_sales_notes','user_id','width','height','apply_purchase_discount','delivery','pickup','store','adult','date','rest','reserved','discount','tax','price_tax','image_large','seo_title','seo_description','seo_keywords','indexing','image_small_height','image_small_width','image_large_height','image_large_width','yandex_market','yandex_market_bid','yandex_market_cid','shop_producer')); | ||
- | ===== Ещё вариант оптимизации каталога: ===== | + | **Для групп товаров:** |
+ | >groupsForbiddenTags(array('shop_id', 'siteuser_id', 'parent_id', 'description', 'image_large', 'image_small', 'sorting', 'indexing', 'subgroups_count', 'subgroups_total_count', 'items_count', 'items_total_count', 'active', 'siteuser_group_id', 'path', 'seo_title', 'seo_description', 'seo_keywords', 'user_id', 'image_large_width', 'image_large_height', 'image_small_width', 'image_small_height', 'guid', 'dir', )) | ||
- | $Shop_Controller_Show->itemsForbiddenTags(array('text','shortcut_id','shop_tax_id','shop_seller_id','shop_group_id','shop_currency_id','shop_id','shop_producer_id','shop_measure_id','type','marking','vendorcode','description','deleted','length','weight','active','siteuser_group_id','sorting','path','siteuser_id','modification_id','guid','showed','manufacturer_warranty','country_of_origin','yandex_market_sales_notes','user_id','width','height','apply_purchase_discount','delivery','pickup','store','adult','date','rest','reserved','discount','tax','price_tax','image_large','seo_title','seo_description','seo_keywords','indexing','image_small_height','image_small_width','image_large_height','image_large_width','yandex_market','yandex_market_bid','yandex_market_cid','shop_producer')); | + | <WRAP center important 60%> |
+ | Использовать код нужно аккуратно, так как свойства из приведенных выше массивов могут использоваться в XSL-шаблонах. | ||
+ | </WRAP> |