iticleonel.len Posted August 28, 2013 Share Posted August 28, 2013 How I can disable all products that have price 0 i try some like this BEGIN UPDATE diventoc_product_shop SET active=0 WHERE diventoc_product IN (SELECT diventoc_product FROM diventoc_stock_available WHERE quantity=0); UPDATE diventoc_product_shop SET active=1 WHERE diventoc_product IN (SELECT diventoc_product FROM diventoc_stock_available WHERE quantity>0); END could you help me? thanks a lot!! Link to comment Share on other sites More sharing options...
vekia Posted August 28, 2013 Share Posted August 28, 2013 you should define column names, not table names in WHERE and SELECT clauses like: UPDATE ps_product_shop SET active=0 WHERE ps_product.id_product IN (SELECT ps_product.id FROM ps_stock_available WHERE quantity=0); Link to comment Share on other sites More sharing options...
El Patron Posted August 28, 2013 Share Posted August 28, 2013 once you have that completed, you can use our module as it will automatically disable products when quantity reaches 0 http://www.prestashop.com/forums/topic/269988-module-automatically-hide-out-of-stock-products-v14-15/ Link to comment Share on other sites More sharing options...
Kirillych Posted September 27, 2013 Share Posted September 27, 2013 (edited) UPDATE `ps_product` SET active=0 WHERE price = 0.000000 ANDUPDATE `ps_product_shop` SET active=0 WHERE price = 0.000000 Edited October 1, 2013 by Kirillych (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 27, 2013 Share Posted September 27, 2013 UPDATE `ps_product` SET active=0 WHERE price = 0.000000 wrong, ps_product_shop Link to comment Share on other sites More sharing options...
Recommended Posts