Jump to content

[SOLVED] copy wholesale price from parent to all combination


Turiddu8686

Recommended Posts

Hello,
You can do this by creating query:
 

UPDATE ps_product_attribute
        INNER JOIN
    ps_product_shop ON ps_product_shop.id_product = ps_product_attribute.id_product 
SET 
    ps_product_attribute.wholesale_price = ps_product_shop.wholesale_price;

UPDATE ps_product_attribute_shop
        INNER JOIN
    ps_product_shop ON ps_product_shop.id_product = ps_product_attribute.id_product 
SET 
    ps_product_attribute.wholesale_price = ps_product_shop.wholesale_price;

Note: 

before run query take backup of ps_product_attribute table, ps_product_attribute_shop table


 

  • Like 1
Link to comment
Share on other sites

Just now, PrestaServicePro said:

" ps_ " add your table prefix and try again.

the table prefix is ps_ standard prestashop prefix 

after run your query the wholesale_price on table ps_product_attribute is valorized with cost but the table ps_product_attribute_shop, NO

Link to comment
Share on other sites

7 minutes ago, PrestaServicePro said:

can you go to BO and check the combinations  whosale_prices updated or not?

 

no in BO not update if the attribute.shop table is not equal on BO it is not seen

the problem  it seems to be here

UPDATE ps_product_attribute_shop
        INNER JOIN
    ps_product_shop ON ps_product_shop.id_product = ps_product_attribute.id_product 
SET 
    ps_product_attribute.wholesale_price = ps_product_shop.wholesale_price;

Link to comment
Share on other sites

  • Turiddu8686 changed the title to [SOLVED] copy wholesale price from parent to all combination

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