alan3k Posted August 23, 2017 Share Posted August 23, 2017 Hi, I would like to change all attributes quantity in database to one value (999). But when I'm trying to change 'ps_product_attribute' -> 'quantity', attribute quantity is not changing. Any ideas? Thanks Link to comment Share on other sites More sharing options...
hakeryk2 Posted August 24, 2017 Share Posted August 24, 2017 Well, because it is stored in ps_stock_available in 'quantity but there is one problem. As You know products can have attributes, sometimes it has 1, sometime it has more attributes and sometimes it doesn't have them at all. Why this is a problem? Let's have an example:Product has id_product = 15 and id_product_attribute = 0, id_product_attribute = 259 and id_product_attribute = 230It means that we have 1 product with 2 attributes/combinations.If You will update quantity of attribute = 259 to 999 and attribute = 230 to also 999 then attrbiute = 0 should have 1998 in quantity because this table sumarize all of the quantities from all atrributes. I don't know how to that in MySQL. 1 Link to comment Share on other sites More sharing options...
alan3k Posted September 4, 2017 Author Share Posted September 4, 2017 Hi Hakeryk2, Now I see this table in database and You are right, there is "id_product_attribute = 0" for every product. If I tried to set quantity for "id_product_attribute = 259" and "id_product_attribute = 230" to 999, value of "id_product_attribute = 0" does not change. Thank You for explanation. 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