Megamack Posted June 17, 2015 Share Posted June 17, 2015 Hi, I have advanced stock management and I have rpoducts in stock but they are not available in my shop. If i reduce stock and add more then they are available. I ahve a lot of products with stock athat are not for sale as they dont automatically appear when I add stock in advanced stock management. Link to comment Share on other sites More sharing options...
Megamack Posted June 17, 2015 Author Share Posted June 17, 2015 I looked in the database and everything seems ok in ps_stock tabel but it is not at all synchronized with ps_stock_Available. I have added products through Stock -> Stock Management Is there a sync script available? Link to comment Share on other sites More sharing options...
Megamack Posted June 18, 2015 Author Share Posted June 18, 2015 Ok searched a little bit more and if I add products through Stock -> Stock Management it takes away stock form other combainations stragely. But then on the other hand i made a little script that updates quantities form ps_stock into ps_stock $sql = 'SELECT * FROM ps_stock'; if ($results = Db::getInstance()->ExecuteS($sql)) foreach ($results as $row){ Db::getInstance()->execute("UPDATE ps_stock_available SET quantity = ".$row['usable_quantity']." WHERE id_product = ".$row['id_product']." AND id_product_attribute=" .$row['id_product_attribute'] ); } Any ideas why it messes up stock? Link to comment Share on other sites More sharing options...
Recommended Posts