I can set the website ids against a product by adding 'websites' => array(1,2)
to an array and saving the product. The problem is this overwrites all websites so if I only want to add a product to a website (without touching the rest) then I need to know which websites the product is associated with.
I tried $product->getWebsites()
but websites
isn't in the _data
var of the product object so returns null.