Jump to content

[Prestashop 1.6.1.15] Products Attributes Quantity


alan3k

Recommended Posts

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

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 = 230

It 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.
 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...