Вывод новых, популярных и особых товаров
Пытаюсь вывести товары помеченные new, popular:
к примеру
В массиве
[[!msProducts? &parents=`2` &where=`{"new:=":1}` ]]
но не выводит :/к примеру
[[!msProducts? &parents=`2` &tpl=`tpl.msProducts.row2` &where=`{"published:=":0}` ]]
— правильно выводит неопубликованные товары. В массиве
[[!msProducts? &parents=`2`]]
имеются записи new => 1Array
(
[id] => 3
[type] => document
[contentType] => text/html
[pagetitle] => TOVAR
[longtitle] =>
[description] =>
[alias] => tovar
[link_attributes] =>
[published] => 1
[pub_date] => 0
[unpub_date] => 0
[parent] => 2
[isfolder] => 0
[introtext] =>
[richtext] => 1
[template] => 5
[menuindex] => 0
[searchable] => 1
[cacheable] => 1
[createdby] => 1
[createdon] => 1396293146
[editedby] => 1
[editedon] => 1396295759
[deleted] => 0
[deletedon] => 0
[deletedby] => 0
[publishedon] => 1396293120
[publishedby] => 1
[menutitle] =>
[donthit] => 0
[privateweb] => 0
[privatemgr] => 0
[content_dispo] => 0
[hidemenu] => 0
[class_key] => msProduct
[context_key] => web
[content_type] => 1
[uri] => category/tovar
[uri_override] => 0
[hide_children_in_tree] => 0
[show_in_tree] => 0
[properties] =>
[article] =>
[price] => 500
[old_price] => 0
[weight] => 0
[image] =>
[thumb] =>
[vendor] => 0
[made_in] =>
[new] => 1
[popular] => 0
[favorite] => 0
В какую сторону копать? Комментарии: 4
Копать всегда нужно начинать с документации.
Какой в итоге вариант решения задачи?
del
<div id="pdopage">
<div class="rows">
[[!pdoPage?
&element=`msProducts`
&ajaxMode=`button`
&limit=`16`
&depth=`0`
&parents=`[[~3]]`
&sortby=`{"publishedon":"desc"}`
&where=`{"Data.favorite":"1"}`]]</div>
[[!+page.nav]]</div>
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.