0

In the admin you can do this:

enter image description here

which is pretty easy to copy a product from one website to another, with the values of another website.

Is there a way to do this programmatically?

EDIT:

I've tried this:

$product = Mage::getModel('catalog/product')->load($productId);
$websiteIds = $product->getWebsiteIds(); //fetch product current websiteIds 
array_push($websiteIds, 5);
$product->setWebsiteIds($websiteIds); //assigning website IDs
$product->save();

And yes, add the product to the other website but with the Default Values. And I don't want that.

0

i think i have an idea let me share with you, look coping a product is nothing but duplicating the existing product with different sku and website id.

when you are writing a program for this load product by sku or id and while insereting change sku of that product as well as website id.

  • But what I want is the same product (same sku) but adding it to a website with the same values of the Main Store (for example). – Natalie Aug 30 '16 at 19:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.