JuanTomas Posted December 1, 2015 Share Posted December 1, 2015 (edited) SOLVED: it turns out all the data for basic stock management is in the ps_stock_available table. The quantity fields in ps_product and ps_product_attribute are not used for basic stock management. Here's the funny part: I thought my database had no ps_stock_available table. Turns out it does, it's table number 251 in the database. My phpMyAdmin displays only 250 tables in a view. Here's how I found out: $ mysqldump --user=root --password=myrootpass --xml my_ps_db > before.xml ...make one change in back office... $ mysqldump --user=root --password=myrootpass --xml my_ps_db > after.xml $ diff before.xml after.xml Thus was the ps_stock_available table revealed. Original post follows: ****************************** I've enabled basic stock management in prestashop 1.6.1.2. I've manually entered some sample values for quantities of both products and product attribute combinations. The back office behavior is as expected; quantities are decremented when the item is ordered and the order confirmed. Trouble is, when I check the quantity field in either ps_product or ps_product_attribute, it's always set to 0. I'm sure I've identified the correct id_product / id_product_attribute. So, apparently the quantity field in those tables is not used for basic stock management. ps_product_shop and ps_product_attribute_shop do not have quantity fields. ps_stock table exists but is empty (I think it's just for advanced stock management, which I'm not planning to use). There is no ps_stock_available table. Edited December 1, 2015 by JuanTomas (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now