Не подскажите способ вывести лист продуктов по id в темплейт файле этого модуля?
Код:
$products = Configuration::get('PRODS');
$res = Db::getInstance()->executeS('
SELECT p.*, product_shop.*, pl.`description_short`, pl.`link_rewrite`, pl.`name`, pl.`available_now`, pl.`available_later`, MAX(image_shop.`id_image`) id_image, il.`legend`
FROM `'._DB_PREFIX_.'product` p
'.Shop::addSqlAssociation('product', 'p').'
LEFT JOIN `'._DB_PREFIX_.'product_lang` pl ON (p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.(int)$this->context->language->id . Shop::addSqlRestrictionOnLang('pl').')
LEFT JOIN `'._DB_PREFIX_.'image` i ON (i.`id_product` = p.`id_product`)'.
Shop::addSqlAssociation('image', 'i', false, 'image_shop.cover=1').'
LEFT JOIN `'._DB_PREFIX_.'image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = '.(int)$this->context->language->id.')
WHERE
p.`id_product` IN ('.implode(',', $products).')
AND product_shop.`visibility` IN ("both", "catalog")
AND product_shop.`active` = 1
AND product_shop.`show_price` = 1
GROUP BY p.id_product
');
if(!$res)
return false;
$this->smarty->assign('products', Product::getProductsProperties($this->context->language->id, $res));
return $this->display(__FILE__, 'name_template.tpl');