array(15) { [0]=> array(4) { ["id_product"]=> string(5) "11722" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [1]=> array(4) { ["id_product"]=> string(5) "11708" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [2]=> array(4) { ["id_product"]=> string(5) "11711" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [3]=> array(4) { ["id_product"]=> string(5) "10104" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [4]=> array(4) { ["id_product"]=> string(5) "10134" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [5]=> array(4) { ["id_product"]=> string(5) "10161" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [6]=> array(4) { ["id_product"]=> string(5) "10187" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [7]=> array(4) { ["id_product"]=> string(5) "10186" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [8]=> array(4) { ["id_product"]=> string(5) "10208" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [9]=> array(4) { ["id_product"]=> string(5) "11685" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [10]=> array(4) { ["id_product"]=> string(5) "10239" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [11]=> array(4) { ["id_product"]=> string(5) "10246" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [12]=> array(4) { ["id_product"]=> string(5) "10259" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "22.496800" ["price_max"]=> string(9) "22.496800" } [13]=> array(4) { ["id_product"]=> string(5) "10511" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "12.492800" ["price_max"]=> string(9) "12.492800" } [14]=> array(4) { ["id_product"]=> string(5) "10544" ["price"]=> string(8) "0.000000" ["price_min"]=> string(9) "12.492800" ["price_max"]=> string(9) "12.492800" } } string(1630) "SELECT p.id_product, sa.out_of_stock FROM (SELECT p.id_product, p.id_manufacturer, SUM(sa.quantity) as quantity, p.condition, p.weight, p.price, psales.quantity as sales, p.date_add FROM ps_product p LEFT JOIN ps_product_attribute pa ON (p.id_product = pa.id_product) LEFT JOIN ps_product_attribute_combination pac ON (pa.id_product_attribute = pac.id_product_attribute) LEFT JOIN ps_stock_available sa ON (p.id_product = sa.id_product AND IFNULL(pac.id_product_attribute, 0) = sa.id_product_attribute AND sa.id_shop = 1 AND sa.id_shop_group = 0 ) LEFT JOIN ps_product_sale psales ON (psales.id_product = p.id_product) INNER JOIN ps_product_shop ps ON (p.id_product = ps.id_product AND ps.id_shop = 1 AND ps.active = TRUE) INNER JOIN ps_category_product cp ON (p.id_product = cp.id_product) INNER JOIN ps_category c ON (cp.id_category = c.id_category AND c.active=1) LEFT JOIN ps_category_group cg ON (cg.id_category = c.id_category) WHERE ps.id_shop='1' AND p.visibility IN ('both', 'catalog') AND cg.id_group='1' AND p.id_manufacturer IN (151, 35) AND c.nleft>=1255 AND c.nright<=1336 GROUP BY p.id_product) p LEFT JOIN ps_product_attribute pa ON (p.id_product = pa.id_product) LEFT JOIN ps_product_attribute_combination pac ON (pa.id_product_attribute = pac.id_product_attribute) LEFT JOIN ps_stock_available sa ON (p.id_product = sa.id_product AND IFNULL(pac.id_product_attribute, 0) = sa.id_product_attribute AND sa.id_shop = 1 AND sa.id_shop_group = 0 ) GROUP BY p.id_product ORDER BY IFNULL(p.quantity, 0) <= 0, IFNULL(p.quantity, 0) <= 0 AND FIELD(sa.out_of_stock, 1) DESC, p.date_add DESC, p.id_product DESC LIMIT 0, 30"