JSON как написать правильно запрос?

Хочу вывести товары с рейтингом от 3 до 5
[[!msProducts?
&parents=`3`
&limit=`10`
&tpl=`tpl.msProducts.row.single2`
&where=`{"Rating:BETWEEN ":"3 AND 5"}`
&includeThumbs=`medium`
]]
Такая конструкция не работает. Как правильно ее написать? Помогите разобраться.
Roman
07 января 2020, 18:06
modx.pro
178
0

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

Станислав
07 января 2020, 18:56
0
&showLog=`1`
И если это ТВ то $includeTVs=`rating`
Если все условия соблюдены, тогда
&where=`{«rating:>=»:3,«and:rating:<=»:5}` но надо логи
    Roman
    07 января 2020, 20:38
    0
    0.0000441: pdoTools loaded.
    0.0001481: Conditions prepared
    0.0000229: xPDO query object created
    0.0003591: Included list of tvs: <b></b>
    0.0001049: leftJoined <i>msProductData</i> as <b>Data</b>
    0.0000479: leftJoined <i>msVendor</i> as <b>Vendor</b>
    0.0000448: leftJoined <i>msProductFile</i> as <b>medium</b>
    0.0000019: Grouped by <b>msProduct.id, `medium`.url</b>
    0.0000200: Added selection of <b>msProduct</b>: <small>`id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `alias_visible`, `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`</small>
    0.0000088: Added selection of <b>msProductData</b>: <small>`article`, `price`, `old_price`, `weight`, `image`, `thumb`, `vendor`, `made_in`, `new`, `popular`, `favorite`, `tags`, `color`, `size`, `source`</small>
    0.0000079: Added selection of <b>msVendor</b>: <small>`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`</small>
    0.0000041: Added selection of <b>msProductFile</b>: <small>url as `medium`</small>
    0.0007989: Processed additional conditions
    0.0009210: Added where condition: <b>class_key=msProduct, Rating:>==3, AND:Rating:<==4, msProduct.parent:IN(3,860,861,867,874,878,880,881,882,888,893,897,903,906,910,920,926,960,1013,1018,1023,862,863,864,865,866,1172,1173,1174,868,869,870,871,872,873,875,876,877,879,883,884,885,886,887,1159,1160,1161,889,890,891,892,894,895,896,898,899,900,901,902,904,905,1162,907,908,909,911,912,913,914,915,916,917,918,919,1168,921,922,923,924,925,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1165,1170,1167,1163,1166,1164,1171,1169,1014,1015,1016,1017,1019,1020,1021,1022,1024,1025,1026,1027), msProduct.published=1, msProduct.deleted=0</b>
    0.0000300: Sorted by <b>msProduct.id</b>, <b>ASC</b>
    0.0000019: Limited to <b>10</b>, offset <b>0</b>
    0.0001969: SQL prepared <small>"SELECT `msProduct`.`id`, `msProduct`.`type`, `msProduct`.`contentType`, `msProduct`.`pagetitle`, `msProduct`.`longtitle`, `msProduct`.`description`, `msProduct`.`alias`, `msProduct`.`alias_visible`, `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`, `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`, `medium`.url as `medium` FROM `qzJhWwMZkqLc_site_content` AS `msProduct` LEFT JOIN `qzJhWwMZkqLc_ms2_products` `Data` ON `msProduct`.`id` =  `Data`.`id` LEFT JOIN `qzJhWwMZkqLc_ms2_vendors` `Vendor` ON Data.vendor=Vendor.id LEFT JOIN `qzJhWwMZkqLc_ms2_product_files` `medium` ON `medium`.product_id = msProduct.id AND `medium`.rank = 0 AND `medium`.path LIKE '%/medium/%' WHERE  ( `msProduct`.`class_key` = 'msProduct' AND `msProduct`.`Rating` >= '3' AND `msProduct`.`Rating` <= '4' AND `msProduct`.`parent` IN (3,860,861,867,874,878,880,881,882,888,893,897,903,906,910,920,926,960,1013,1018,1023,862,863,864,865,866,1172,1173,1174,868,869,870,871,872,873,875,876,877,879,883,884,885,886,887,1159,1160,1161,889,890,891,892,894,895,896,898,899,900,901,902,904,905,1162,907,908,909,911,912,913,914,915,916,917,918,919,1168,921,922,923,924,925,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1165,1170,1167,1163,1166,1164,1171,1169,1014,1015,1016,1017,1019,1020,1021,1022,1024,1025,1026,1027) AND `msProduct`.`published` = 1 AND `msProduct`.`deleted` = 0 )  GROUP BY msProduct.id, `medium`.url ORDER BY msProduct.id ASC LIMIT 10 "</small>
    0.0005741: Could not process query, error #1054: Unknown column 'msProduct.Rating' in 'where clause'
    0.0026512: <b>Total time</b>
    6 291 456: <b>Memory usage</b>
      Roman
      07 января 2020, 20:44
      0
      Rating — это опция, а не TV шка
        Roman
        07 января 2020, 20:51
        0
        Так отрабатывает:
        [[!msProducts?
                                                &parents=`3`
                                                &limit=`10`
                                                &tpl=`tpl.msProducts.row.single2`
                                                &optionFilters=`{"Rating:>=":3}`
                                                &includeThumbs=`medium`
                                                &showLog=`1`
                                            ]]

        Но условие не то
        0.0000429: pdoTools loaded.
        0.0000932: Conditions prepared
        0.0000150: xPDO query object created
        0.0000739: leftJoined <i>msProductData</i> as <b>Data</b>
        0.0000539: leftJoined <i>msVendor</i> as <b>Vendor</b>
        0.0000439: leftJoined <i>msProductFile</i> as <b>medium</b>
        0.0000432: leftJoined <i>msProductOption</i> as <b>Rating</b>
        0.0000010: Grouped by <b>msProduct.id, `medium`.url</b>
        0.0000212: Added selection of <b>msProduct</b>: <small>`id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `alias_visible`, `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`</small>
        0.0000091: Added selection of <b>msProductData</b>: <small>`article`, `price`, `old_price`, `weight`, `image`, `thumb`, `vendor`, `made_in`, `new`, `popular`, `favorite`, `tags`, `color`, `size`, `source`</small>
        0.0000079: Added selection of <b>msVendor</b>: <small>`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`</small>
        0.0000050: Added selection of <b>msProductFile</b>: <small>url as `medium`</small>
        0.0008221: Processed additional conditions
        0.0009320: Added where condition: <b>class_key=msProduct, Rating.value:>==3, msProduct.parent:IN(3,860,861,867,874,878,880,881,882,888,893,897,903,906,910,920,926,960,1013,1018,1023,862,863,864,865,866,1172,1173,1174,868,869,870,871,872,873,875,876,877,879,883,884,885,886,887,1159,1160,1161,889,890,891,892,894,895,896,898,899,900,901,902,904,905,1162,907,908,909,911,912,913,914,915,916,917,918,919,1168,921,922,923,924,925,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1165,1170,1167,1163,1166,1164,1171,1169,1014,1015,1016,1017,1019,1020,1021,1022,1024,1025,1026,1027), msProduct.published=1, msProduct.deleted=0</b>
        0.0000281: Sorted by <b>msProduct.id</b>, <b>ASC</b>
        0.0000019: Limited to <b>10</b>, offset <b>0</b>
        0.0001841: SQL prepared <small>"SELECT `msProduct`.`id`, `msProduct`.`type`, `msProduct`.`contentType`, `msProduct`.`pagetitle`, `msProduct`.`longtitle`, `msProduct`.`description`, `msProduct`.`alias`, `msProduct`.`alias_visible`, `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`, `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`, `medium`.url as `medium` FROM `qzJhWwMZkqLc_site_content` AS `msProduct` LEFT JOIN `qzJhWwMZkqLc_ms2_products` `Data` ON `msProduct`.`id` =  `Data`.`id` LEFT JOIN `qzJhWwMZkqLc_ms2_vendors` `Vendor` ON Data.vendor=Vendor.id LEFT JOIN `qzJhWwMZkqLc_ms2_product_files` `medium` ON `medium`.product_id = msProduct.id AND `medium`.rank = 0 AND `medium`.path LIKE '%/medium/%' LEFT JOIN `qzJhWwMZkqLc_ms2_product_options` `Rating` ON `Rating`.product_id = Data.id AND `Rating`.key = 'Rating' WHERE  ( `msProduct`.`class_key` = 'msProduct' AND `Rating`.`value` >= '3' AND `msProduct`.`parent` IN (3,860,861,867,874,878,880,881,882,888,893,897,903,906,910,920,926,960,1013,1018,1023,862,863,864,865,866,1172,1173,1174,868,869,870,871,872,873,875,876,877,879,883,884,885,886,887,1159,1160,1161,889,890,891,892,894,895,896,898,899,900,901,902,904,905,1162,907,908,909,911,912,913,914,915,916,917,918,919,1168,921,922,923,924,925,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1165,1170,1167,1163,1166,1164,1171,1169,1014,1015,1016,1017,1019,1020,1021,1022,1024,1025,1026,1027) AND `msProduct`.`published` = 1 AND `msProduct`.`deleted` = 0 )  GROUP BY msProduct.id, `medium`.url ORDER BY msProduct.id ASC LIMIT 10 "</small>
        0.0027151: SQL executed
        0.0000300: Rows fetched
        0.0000339: Returning raw data
        0.0005920: Checked the active modifiers
        0.0011730: Loaded "modChunk" with name "tpl.msProducts.row.single2"
        0.0013311: Compiled Fenom chunk with name "modchunk/71"
        0.0017719: Time to load products options
        0.0099621: <b>Total time</b>
        6 291 456: <b>Memory usage</b>
        Roman
        07 января 2020, 21:00
        0
        Так тоже не работает.
        [[!msProducts?
        &parents=`3`
        &limit=`10`
        &tpl=`tpl.msProducts.row.single2`
        &optionFilters=`{"Rating:>=":3,"Rating:<=":5}`
        &includeThumbs=`medium`
        &showLog=`1`
        ]]
          Станислав
          08 января 2020, 14:15
          +1
          &optionFilter=`['Rating:>=' =>3, 'AND:Rating:<=' =>5]`
          попробуйте так еще, либо использовать innerJoin
          возможно поможет статья
          webstool.ru/modx-minishop2-primeryi-vyiborki-where-optionfilters-innerjoin.html
            Roman
            08 января 2020, 21:04
            0
            Попробовал c &optionFilter=`['Rating:>=' =>3, 'AND:Rating:<=' =>5]`
            не выводит нужные товары.
            <pre class="msProductsLog">0.0000501: pdoTools loaded.
            0.0000918: Conditions prepared
            0.0000219: xPDO query object created
            0.0000811: leftJoined <i>msProductData</i> as <b>Data</b>
            0.0000520: leftJoined <i>msVendor</i> as <b>Vendor</b>
            0.0000451: leftJoined <i>msProductFile</i> as <b>medium</b>
            0.0000010: Grouped by <b>msProduct.id, `medium`.url</b>
            0.0000200: Added selection of <b>msProduct</b>: <small>`id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `alias_visible`, `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`</small>
            0.0000091: Added selection of <b>msProductData</b>: <small>`article`, `price`, `old_price`, `weight`, `image`, `thumb`, `vendor`, `made_in`, `new`, `popular`, `favorite`, `tags`, `color`, `size`, `source`</small>
            0.0000081: Added selection of <b>msVendor</b>: <small>`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`</small>
            0.0000041: Added selection of <b>msProductFile</b>: <small>url as `medium`</small>
            0.0007470: Processed additional conditions
            0.0008922: Added where condition: <b>class_key=msProduct, msProduct.parent:IN(3,860,861,867,874,878,880,881,882,888,893,897,903,906,910,920,926,960,1013,1018,1023,862,863,864,865,866,1172,1173,1174,868,869,870,871,872,873,875,876,877,879,883,884,885,886,887,1159,1160,1161,889,890,891,892,894,895,896,898,899,900,901,902,904,905,1162,907,908,909,911,912,913,914,915,916,917,918,919,1168,921,922,923,924,925,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1165,1170,1167,1163,1166,1164,1171,1169,1014,1015,1016,1017,1019,1020,1021,1022,1024,1025,1026,1027), msProduct.published=1, msProduct.deleted=0</b>
            0.0000291: Sorted by <b>msProduct.id</b>, <b>ASC</b>
            0.0000019: Limited to <b>10</b>, offset <b>0</b>
            0.0001681: SQL prepared <small>"SELECT `msProduct`.`id`, `msProduct`.`type`, `msProduct`.`contentType`, `msProduct`.`pagetitle`, `msProduct`.`longtitle`, `msProduct`.`description`, `msProduct`.`alias`, `msProduct`.`alias_visible`, `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`, `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`, `medium`.url as `medium` FROM `qzJhWwMZkqLc_site_content` AS `msProduct` LEFT JOIN `qzJhWwMZkqLc_ms2_products` `Data` ON `msProduct`.`id` =  `Data`.`id` LEFT JOIN `qzJhWwMZkqLc_ms2_vendors` `Vendor` ON Data.vendor=Vendor.id LEFT JOIN `qzJhWwMZkqLc_ms2_product_files` `medium` ON `medium`.product_id = msProduct.id AND `medium`.rank = 0 AND `medium`.path LIKE '%/medium/%' WHERE  ( `msProduct`.`class_key` = 'msProduct' AND `msProduct`.`parent` IN (3,860,861,867,874,878,880,881,882,888,893,897,903,906,910,920,926,960,1013,1018,1023,862,863,864,865,866,1172,1173,1174,868,869,870,871,872,873,875,876,877,879,883,884,885,886,887,1159,1160,1161,889,890,891,892,894,895,896,898,899,900,901,902,904,905,1162,907,908,909,911,912,913,914,915,916,917,918,919,1168,921,922,923,924,925,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,961,962,963,964,965,966,967,968,969,970,971,972,973,974,975,976,977,978,979,980,981,982,983,984,985,986,987,988,989,990,991,992,993,994,995,996,997,998,999,1000,1001,1002,1003,1004,1005,1006,1007,1008,1009,1010,1011,1012,1165,1170,1167,1163,1166,1164,1171,1169,1014,1015,1016,1017,1019,1020,1021,1022,1024,1025,1026,1027) AND `msProduct`.`published` = 1 AND `msProduct`.`deleted` = 0 )  GROUP BY msProduct.id, `medium`.url ORDER BY msProduct.id ASC LIMIT 10 "</small>
            0.0023639: SQL executed
            0.0000701: Rows fetched
            0.0000999: Returning raw data
            0.0004129: Checked the active modifiers
            0.0010409: Loaded "modChunk" with name "tpl.msProducts.row.single2"
            0.0010371: Retrieved data from cache "default/pdotools/modchunk/71"
            0.0068295: Time to load products options
            0.0294430: <b>Total time</b>
            4 194 304: <b>Memory usage</b>
            </pre>
              Roman
              08 января 2020, 21:15
              0
              А вот с innerJoin заработало! Спасибо большое за направление!
              [[!msProducts?
                  &parents=`3`
                  &limit=`10`
                  &showLog=`1`
                  &tpl=`tpl.msProducts.row.single2`
                    &innerJoin=`{
                    "option1": {
                      "class": "msProductOption",
                      "on": "option1.key = 'Rating' AND option1.product_id = msProduct.id AND option1.value >= 3 AND option1.value < 5"
                    }
                    }`
                  &includeThumbs=`medium`
              ]]
            Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
            8