Jump to content

Make all stock available in webshop


Recommended Posts

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.

 

 

 

 

post-863176-0-11386700-1434549088_thumb.png

post-863176-0-04700300-1434549102_thumb.png

Link to comment
Share on other sites

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

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

×
×
  • Create New...