On 7/6/2017 at 3:38 PM, infisual said:I had the same problem when I had 1.6x and it is also in 1.7.1.2
you will need to add the following line
JOIN `'._DB_PREFIX_.'stock_available` saON (sa.`id_product_attribute`=pac.`id_product_attribute` AND sa.`quantity`>0)
so the complete line will like this:
foreach ($sub_queries as $sub_query) {$query_filters_where .= ' AND p.id_product IN (SELECT pa.`id_product`FROM `'._DB_PREFIX_.'product_attribute_combination` pacLEFT JOIN `'._DB_PREFIX_.'product_attribute` paON (pa.`id_product_attribute` = pac.`id_product_attribute`)'.Shop::addSqlAssociation('product_attribute', 'pa').'JOIN `'._DB_PREFIX_.'stock_available` saON (sa.`id_product_attribute`=pac.`id_product_attribute` AND sa.`quantity`>0)WHERE '.implode(' OR ', $sub_query).') ';}
good luck
Thanks for help!
Best regards