Виджеты (newLevel/widgets)
/brands.tpl
Используется для вывода брендов
Содержит переменную $brands (массив) - содержит список брендов доступных для вывода.
Пример вывода {var_dump($brands)}
:
array (size=1)
0 =>
array (size=6)
'name' => string 'Pioneer' (length=7)
'url' => string 'pioneer' (length=7)
'full_url' => string 'brand/pioneer' (length=13)
'img_fullpath' => string '/uploads/shop/brands/pioneer.png' (length=32)
'total' => int 0
'model' =>
object(SBrands)[996]
protected 'startCopy' => boolean false
protected 'id' => int 30
protected 'url' => string 'pioneer' (length=7)
protected 'image' => string 'pioneer.png' (length=11)
protected 'position' => int 0
protected 'collSProductss' => null
protected 'collSBrandsI18ns' =>
object(PropelObjectCollection)[1037]
...
protected 'alreadyInSave' => boolean false
protected 'alreadyInValidation' => boolean false
protected 'currentLocale' => string 'ru' (length=2)
protected 'currentTranslations' =>
array (size=1)
...
protected 'sProductssScheduledForDeletion' => null
protected 'sBrandsI18nsScheduledForDeletion' => null
protected 'validationFailures' =>
array (size=0)
...
public 'customFields' => null
public 'customData' => null
public 'hasCustomData' => boolean false
public 'entityId' => null
private 'entities_locale' (ShopBaseObject) =>
array (size=1)
...
protected '_new' => boolean false
protected '_deleted' => boolean false
protected 'modifiedColumns' =>
array (size=0)
...
protected 'virtualColumns' =>
array (size=0)
...
/latest_news.tpl
Используется для вывода информации о страницах
Содержит переменную $recent_news (массив) - содержит список статей доступных для вывода.
Пример вывода {var_dump($recent_news)}
:
array (size=2)
0 =>
array (size=9)
'full_url' => string 'novosti/zachem-vashemu-offlain-biznesu-nuzhen-internet-magazin' (length=62)
'id' => string '96' (length=2)
'title' => string 'Зачем вашему оффлайн-бизнесу нужен Интернет-магазин?' (length=97)
'prev_text' => string 'Несмотря на бурный рост Интернет-коммерции, далеко не все предприниматели понимают, в чем преимущества Интернет-магазина, особенно если уже есть оф...' (length=274)
'publish_date' => string '1362226037' (length=10)
'showed' => string '9' (length=1)
'comments_count' => string '0' (length=1)
'author' => string 'Administrator' (length=13)
'cat_name' => string 'Новости' (length=14)
1 =>
array (size=9)
'full_url' => string 'novosti/otsenka-stoimosti-saita-i-faktory-kotorye-vliiaiut-na-tsenu' (length=67)
'id' => string '95' (length=2)
'title' => string 'Оценка стоимости сайта и факторы, которые влияют на цену' (length=103)
'prev_text' => string 'Как во время разработки, так и во время продажи Интернет-ресурса учитывается достаточно много факторов, влияющих на его цену. Поэтому нужно уметь о...' (length=272)
'publish_date' => string '1362225958' (length=10)
'showed' => string '2' (length=1)
'comments_count' => string '0' (length=1)
'author' => string 'Administrator' (length=13)
'cat_name' => string 'Новости' (length=14)
/new_products.tpl
Используется для вывода товаров, обозначенных в административной части как “новинка”
Содержит переменную $products (объект) - сожержит список товаров (новинок) доступных для вывода.
Пример вывода {var_dump($products)}
(одного товара):
object(SProducts)[1057]
protected 'id' => int 1108
protected 'url' => string 'nokia-lumia-920-white' (length=21)
protected 'brand_id' => int 42
protected 'category_id' => int 931
protected 'created' => int 1364760000
protected 'updated' => int 1368876641
/action_products.tpl
Используется для вывода товаров, обозначенных в административной части как “акция”
Содержит переменную $products (объект) - сожержит список товаров (акционных) доступных для вывода.
Пример вывода {var_dump($products)}:
такой же как и в виджете (/new_products.tpl)
/popular_products.tpl
Используется для вывода товаров, обозначенных в административной части как "хит"
Содержит переменную $products (объект) - сожержит список товаров (популярных) доступных для вывода.
Пример вывода {var_dump($products)}:
такой же как и в виджете (/new_products.tpl)
/path.tpl
Используется для отображения пути к текущей странице (хлебные крошки)
Содержит переменную $navi_cats (массив) - сожержит последовательный массив доступа к текущей странице
Пример вывода {var_dump($navi_cats)}:
array (size=3)
0 =>
array (size=20)
'id' => string '8' (length=1)
'parent_id' => string '0' (length=1)
'position' => string '1' (length=1)
'full_path' => string 'telefoniia-pleery-gps' (length=21)
'full_path_ids' => string 'a:0:{}' (length=6)
'active' => string '1' (length=1)
'external_id' => null
'image' => string '/uploads/shop/categories/21.jpg' (length=31)
'tpl' => string 'categorysubfirst' (length=16)
'order_method' => string '0' (length=1)
'showsitetitle' => null
'column' => null
'locale' => string 'ru' (length=2)
'name' => string 'Телефония, МР3-плееры, GPS' (length=43)
'h1' => string '' (length=0)
'description' => null
'meta_desc' => string '' (length=0)
'meta_title' => string '' (length=0)
'meta_keywords' => string '' (length=0)
'path_url' => string 'shop/category/telefoniia-pleery-gps' (length=35)
1 =>
array (size=20)
'id' => string '927' (length=3)
'parent_id' => string '8' (length=1)
'position' => string '2' (length=1)
'full_path' => string 'telefoniia-pleery-gps/telefony' (length=30)
'full_path_ids' => string 'a:1:{i:0;i:8;}' (length=14)
'active' => string '1' (length=1)
'external_id' => null
'image' => string '/uploads/shop/categories/21.jpg' (length=31)
'tpl' => string 'categorysubsecond' (length=17)
'order_method' => string '0' (length=1)
'showsitetitle' => null
'column' => null
'locale' => string 'ru' (length=2)
'name' => string 'Телефоны' (length=16)
'h1' => string 'Телефоны ' (length=18)
'description' => null
'meta_desc' => string '' (length=0)
'meta_title' => string '' (length=0)
'meta_keywords' => string '' (length=0)
'path_url' => string 'shop/category/telefoniia-pleery-gps/telefony' (length=44)
2 =>
array (size=2)
'path_url' => string 'mobilnye-telefony' (length=17)
'name' => string 'Мобильные телефоны' (length=35)
/similar.tpl
Используется для вывода похожих товаров на странице товара
Содержит переменную $model (объект) - текущий товар
С помощью функции getSimilarProduct, и следующей конструкции, определяются похожие товары:
getSimilarProduct($model, $settings[productsCount])
Пример вывода небольшой части {var_dump($model)}:
object(SProducts)[892]
protected 'id' => int 5623
protected 'url' => string 'mobilnyi-telefon-fly-e141-tv-dual-sim-black' (length=43)
protected 'brand_id' => int 119
protected 'category_id' => int 930
protected 'created' => int 1366892811
protected 'updated' => int 1366893240
/ViewedProducts.tpl
Используется для вывода просмотренных товаров
Содержит переменную $products (объект) - содержит список просмотренных товаров
Пример вывода небольшой части (var_dump($products)):
object(PropelObjectCollection)[996]
object(SProducts)[892]
protected 'id' => int 5623
protected 'url' => string 'mobilnyi-telefon-fly-e141-tv-dual-sim-black' (length=43)
protected 'brand_id' => int 119
protected 'category_id' => int 930
protected 'related_products' => null
protected 'old_price' => null
protected 'created' => int 1366892811
protected 'updated' => int 1366893240
...