Jump to content

[solved] Updated minimal_quantity field through database changes not shown


Recommended Posts

Hi,

 

I have about 1500 products that I imported through csv import. Unfortunately prestashop doesn't offer the "minimal_quantity" field in the csv import for a product without combinations (yes i know it is offered for combinations).

 

As such, I've manually created update statements to update the minimal_quantity field in the table "ps_product" by matching my reference id (model code) and inserting the correct minimal quantity.

 

used this sql statement:

update ps_product set minimal_quantity='2' where reference='901-001';

 

My problem is that after I've successfully updated the database with a new amount, I do not see these changes reflected in the backoffice when viewing the product (it still says 1) and when I visit the products page, it does not mention anything about a minimum quantity, even though I have updated this number in the database to be greater than 1.

 

If I save the minimal quantity through the back office, it updates the database field (same one that I updated through sql update statements) and then it shows correctly on the back office and also front office. What am I missing?

 

I am currently forcing the compile in the back office but still no changes are seen.

 

Does anyone know what I need to do?

 

Thanks in advance for your help!

Edited by vekia (see edit history)
Link to comment
Share on other sites

I solved the issue...

 

Answer for anyone who is interested..

 

prestashop uses table "ps_product_shop" to get the minimum quantities not from ps_product.

 

So we need to be updating that table's field for minimum_quantities NOT ps_product (even though it exists)

 

Hope this helps someone. What's interesting is that when you update minimum quantities through the back office, it updates both table's minimum_quantities field in: ps_product_shop & ps_product

but it only seems to read from ps_product_shop.

 

I have both of them updated for consistency purposes but, it seems like you don't need to keep ps_product minimum_quantity updated. Maybe its used for something else?

  • Like 2
Link to comment
Share on other sites

×
×
  • Create New...