Maria Gonzalez Posted June 16, 2015 Share Posted June 16, 2015 Hi, I'll like to show only products with stock available. It's possible to do that? Someone know how to? I have prestashop 1.6 Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted June 17, 2015 Share Posted June 17, 2015 Where exactly? Inside categories only or throughout all the store? Link to comment Share on other sites More sharing options...
Maria Gonzalez Posted June 17, 2015 Author Share Posted June 17, 2015 In the best sellers module, in the home page tab. Link to comment Share on other sites More sharing options...
NemoPS Posted June 17, 2015 Share Posted June 17, 2015 Ah, sorry I missed the title.You need to modify the sql query of ProductSale::getBestSalesLightYou can find the class file inside classes/See this part $sql.= ' WHERE product_shop.`active` = 1 AND p.`visibility` != \'none\' GROUP BY product_shop.id_product ORDER BY sales DESC LIMIT '.(int)($page_number * $nb_products).', '.(int)$nb_products; add the following AND stock.quantity > 0Right after the first AND Link to comment Share on other sites More sharing options...
Maria Gonzalez Posted June 17, 2015 Author Share Posted June 17, 2015 (edited) Thanks for your reply. It worked!! Thanks! Edited June 17, 2015 by Maria Gonzalez (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts