[РЕШЕНО] не могу сформировать where запрос

Хочу выводить товары с определенным тегом. Сформирвал запрос
&where=`{"msoption$tags:IN":["вентиляция","изоляция"]}`
Но безуспешно. Код самого сниппета:
[[!mFilter2?
                  &filter_delimeter=`$`
                  &element=`msProducts`
                  &includeThumbs=`150x150`
                  &class=`msProduct`
                  &parents=`0`
                  &limit=`10`
                  &where=`{"msoption$tags:IN":["вентиляция","изоляция"]}`
                  &sortby=`RAND()`
                  &filters=`msoption$tags`
                  &tpls=`tpl.msProducts.row.similargoods` 
                  &tplOuter=`tpl.mFilter2.outer.similargoods`
                  &wrapIfEmpty=`0`
                  &suggestionsRadio=`msoption$tags`
                  &tplWrapper=`@INLINE <ul id="similargoods" class="p-top-10 p-bottom-10">[[+output]]</ul>`
                  &tplFilter.row.msoption$tags=`tpl.mFilter2.filter.radio.similargoods`
                  &tplFilter.outer.msoption$tags=`@INLINE <div class="related-products-buttons p-top-10 p-bottom-10">
                  [[+rows]]
                  </div>`
                  ]]
Лог
0.0001531: pdoTools loaded.
0.0003710: Conditions prepared
0.0000410: xPDO query object created
0.0002160: leftJoined msProductData as Data
0.0001419: leftJoined msVendor as Vendor
0.0001421: leftJoined msProductFile as 150x150
0.0000021: Grouped by msProduct.id, `150x150`.url
0.0000470: Added selection of msProduct: SQL_CALC_FOUND_ROWS `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
0.0000408: Added selection of msProductData: `article`, `price`, `old_price`, `weight`, `image`, `thumb`, `vendor`, `made_in`, `new`, `popular`, `favorite`, `tags`, `color`, `size`, `source`, `availability`, `energosber`, `strana`, `material`, `model`, `tip`, `garantiya`, `razmerkoroba`, `vneshrazmerkoroba`, `vnutrrazmerkoroba`, `razmahprirasklad`, `razmahslojen`, `kolvosegmentov`, `tolshinautiplitelya`, `skladnaya`, `razdvijnaya`, `tolshinametalla`, `dvuhstoron`, `kolvocinka`, `podderevo`, `podkamen`, `kraska`, `tippokritiya`, `series`
0.0000219: Added selection of msVendor: `name` AS `vendor.name`, `resource` AS `vendor.resource`, `country` AS `vendor.country`, `logo` AS `vendor.logo`, `address` AS `vendor.address`, `phone` AS `vendor.phone`, `fax` AS `vendor.fax`, `email` AS `vendor.email`, `description` AS `vendor.description`, `properties` AS `vendor.properties`
0.0000129: Added selection of msProductFile: url as `150x150`
0.0000420: Processed additional conditions
0.0002580: Added where condition: class_key=msProduct, msoption$tags:IN(вентиляция,изоляция), msProduct.published=1, msProduct.deleted=0
0.0000670: Sorted by RAND(), ASC
0.0000029: Limited to 10, offset 0
0.0004191: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `msProduct`.`id`, `msProduct`.`type`, `msProduct`.`contentType`, `msProduct`.`pagetitle`, `msProduct`.`longtitle`, `msProduct`.`description`, `msProduct`.`alias`, `msProduct`.`link_attributes`, `msProduct`.`published`, `msProduct`.`pub_date`, `msProduct`.`unpub_date`, `msProduct`.`parent`, `msProduct`.`isfolder`, `msProduct`.`introtext`, `msProduct`.`richtext`, `msProduct`.`template`, `msProduct`.`menuindex`, `msProduct`.`searchable`, `msProduct`.`cacheable`, `msProduct`.`createdby`, `msProduct`.`createdon`, `msProduct`.`editedby`, `msProduct`.`editedon`, `msProduct`.`deleted`, `msProduct`.`deletedon`, `msProduct`.`deletedby`, `msProduct`.`publishedon`, `msProduct`.`publishedby`, `msProduct`.`menutitle`, `msProduct`.`donthit`, `msProduct`.`privateweb`, `msProduct`.`privatemgr`, `msProduct`.`content_dispo`, `msProduct`.`hidemenu`, `msProduct`.`class_key`, `msProduct`.`context_key`, `msProduct`.`content_type`, `msProduct`.`uri`, `msProduct`.`uri_override`, `msProduct`.`hide_children_in_tree`, `msProduct`.`show_in_tree`, `msProduct`.`properties`, `Data`.`article`, `Data`.`price`, `Data`.`old_price`, `Data`.`weight`, `Data`.`image`, `Data`.`thumb`, `Data`.`vendor`, `Data`.`made_in`, `Data`.`new`, `Data`.`popular`, `Data`.`favorite`, `Data`.`tags`, `Data`.`color`, `Data`.`size`, `Data`.`source`, `Data`.`availability`, `Data`.`energosber`, `Data`.`strana`, `Data`.`material`, `Data`.`model`, `Data`.`tip`, `Data`.`garantiya`, `Data`.`razmerkoroba`, `Data`.`vneshrazmerkoroba`, `Data`.`vnutrrazmerkoroba`, `Data`.`razmahprirasklad`, `Data`.`razmahslojen`, `Data`.`kolvosegmentov`, `Data`.`tolshinautiplitelya`, `Data`.`skladnaya`, `Data`.`razdvijnaya`, `Data`.`tolshinametalla`, `Data`.`dvuhstoron`, `Data`.`kolvocinka`, `Data`.`podderevo`, `Data`.`podkamen`, `Data`.`kraska`, `Data`.`tippokritiya`, `Data`.`series`, `Vendor`.`name` AS `vendor.name`, `Vendor`.`resource` AS `vendor.resource`, `Vendor`.`country` AS `vendor.country`, `Vendor`.`logo` AS `vendor.logo`, `Vendor`.`address` AS `vendor.address`, `Vendor`.`phone` AS `vendor.phone`, `Vendor`.`fax` AS `vendor.fax`, `Vendor`.`email` AS `vendor.email`, `Vendor`.`description` AS `vendor.description`, `Vendor`.`properties` AS `vendor.properties`, `150x150`.url as `150x150` FROM `modx_site_content` AS `msProduct` LEFT JOIN `modx_ms2_products` `Data` ON `msProduct`.`id` =  `Data`.`id` LEFT JOIN `modx_ms2_vendors` `Vendor` ON Data.vendor=Vendor.id LEFT JOIN `modx_ms2_product_files` `150x150` ON `150x150`.product_id = msProduct.id AND `150x150`.rank = 0 AND `150x150`.path LIKE '%/150x150/%' WHERE  ( `msProduct`.`class_key` = 'msProduct' AND `msProduct`.`msoption$tags` IN ('вентиляция','изоляция') AND `msProduct`.`published` = 1 AND `msProduct`.`deleted` = 0 )  GROUP BY msProduct.id, `150x150`.url ORDER BY RAND() ASC LIMIT 10 "
0.0012081: Could not process query, error #1054: Unknown column 'msProduct.msoption$tags' in 'where clause'
0.0034049: Total time
20 185 088: Memory usage
Roman
15 октября 2018, 15:34
modx.pro
1 971
0

Комментарии: 2

Roman
15 октября 2018, 18:04
0
Все равно не получается выводить по тегам только товары вентиляции и изоляции. Выводятся все товары
&where=`{"Data.tags":IN:["вентиляция","изоляция"]}`
Вот лог.
0.0018351: pdoTools loaded.
0.0756569: Fetched 2395 ids for building filters from element "msProducts"
0.0000100: Suggestions disabled by "suggestionsMaxResults" parameter: results count is 2395, max allowed is 2000
0.0000019: Getting filters for 2395 ids
0.2425840: Fired paginator: "pdoPage"
0.0000041: Filters retrieved
0.0006881: Loaded "modChunk" with name "tpl.mFilter2.filter.radio.similargoods"
0.0006981: Created inline "modChunk" with name "4ab180e845b9c1b2d438e1a16c9e8b62"
0.0000319: Filters templated
0.0000038: Total filter operations: 0
0.3217161: Total time
22 544 384: Memory usage
    Николай
    15 октября 2018, 18:18
    0
    Вот тут почитайте — modx.pro/help/16517
      Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
      2