Hi, everyone.
I have a little problem, and I hope you can help me. Suppose I have a Site that has two Websites: Website1 and Website2. Respectively each has its StoreView1 and StoreView2:
--Website1
----StoreView1
--Website2
----StoreView2
And I haven the next Category structure:
--Default Category
----Shoes
----Outlet
------Shoes
So, if a Product is Shoes, It should be assigned to Category Shoes. In additional, if the product is Outlet, It should be assigned to Outlet > Shoes. But, a product can be Outlet in StoreView1 but not in StoreView2. So, I need that the product in StoreView1 to be assigned to Shoes and Outlet > Shoes, but in StoreView2 to be assigned only to Shoes.
But, when I try it:
$product = Mage::getModel('catalog/product')->setStoreId(<id of StoreView1>)->load(<Product Id>);
$product->setCategoryIds(array(<Shoes id>, <Outlet > Shoes Id>)->save();
$product = Mage::getModel('catalog/product')->setStoreId(<id of StoreView2>)->load(<Product Id>);
$product->setCategoryIds(array(<Shoes id>)->save();
The product always take the last categories I assigned. In other words, it assigns the categories to all stores equally, instead of assigning per store. I tried in Admin, changing product categories, positioned on the scope of the store view, but also the change is reflected in the other store view too. Are product categories always global? Is there no way to assign them for Store View?
Thanks for the help.