Last active
August 19, 2021 09:44
-
-
Save Sentinel-7/00144f9bfe1c38e5d03f29461d48038e to your computer and use it in GitHub Desktop.
достаем картинки для товаров, когда нужно вывести пару картинок для одной карточке в списке
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{'!msProducts' | snippet : [ | |
'parents'=>$_modx->resource.id, | |
'leftJoin' => '{ "images": { "class":"msProductFile","alias":"images", "on": "images.product_id = msProduct.id AND images.path LIKE \'%/small/\'" }}', | |
'select' => '{ "images":"GROUP_CONCAT(images.url SEPARATOR \';;\') as images"}', | |
'limit'=>0, | |
'sortby'=>'menuindex', | |
'sortdir'=>'ASC', | |
'showLog'=>0, | |
'tpl'=>'@FILE chunks/item/product.tpl' | |
]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment