Jump to content

[SOLVED] Database column `ps_product_attribute` -> `price` not affecting actual price reduction


kizviat

Recommended Posts

Hello,

 

I have a huge number of combinations for one product and the effects on the price for the combinations is not able to set when generating to combination because of more complex logic in the price calculation.

 

So I decided to make my work easier using queries in database to set the prices right for the combinations. I am pretty sure that I am modifying the column `price` for the rite `id_product_attribute` but anyway, the price reduction is not affected by the changes in the database. But when I modify the price reduction in "admin", the change is updated in the very same column in the database and it works that way. But if I had to modify all the prices manually I would do it... like... forever...

 

I attach screenshots with the database with corresponding combinations and a screenshot from "Combinations" tab in the product of matter.

 

post-969083-0-99758000-1432490412_thumb.pngpost-969083-0-04296000-1432490414_thumb.png

 

As you can see, the first three combinations have same value in database and in the "Combinations" tab (0.08333 €/0.13333 €/0.08333 €). I've set these manually. However, the next two (and like 200 following combinations) are -0,0417 € in "admin" but the same as the previous three in database.

 

Could anyone explain me what to do so the prices in the database correspond with the one in product combinations?

 

Thank you.

 

David.

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

Do you change your price in ps_product_attribute, or ps_product_attribute_shop?

 

As I remember, in 1.5+, when they started multishop, they moved to ps_product_attribute_shop to store the prices. It might very well be that they ALSO modify (read store) the price in ps_product_attribute table, but that it only is for backward compatibility with older modules etc. who use this table to READ the prices, but that the 'real' price is stored in the new shop table, which is the one they retrieve the values from when updating/using prices etc. within PrestaShop self.

 

My 2 cents,

pascal

  • Like 1
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...