Jump to content

Update price programmatically updating it in the wrong store


Recommended Posts

Hello

I have a script that programmatically imports a CSV file to update product prices & weights
I have a multi-store setup
The problem I am facing is that the script seems to only update the price & weight in the default shop, not the correct one, but the description updates in the correct shop

This is the code:

$Product = new Product((int)$id_product, null, null, $this->shopId);

$Product->name = self::createMultiLangField($name); 

$Product->description_short = self::createMultiLangField($shortDescription); 

$Product->description = self::createMultiLangField($description);

$Product->weight = $weight;

$Product->price = $price;

$Product->update()

 

Any help would be greatly appreciated as this has been boggling my mind

tahnks

Link to comment
Share on other sites

  • 2 weeks later...

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