Assign different products to different stores and

2019-08-28 02:18发布

I have a website with 5 stores, with one store view (German) for each. I want to add some products to the first store, some other products to the second store, and so on. How do I do this? Also, I have a completely custom-made page in the backend where products are displayed, and can be selected and exported. I want to be able to filter the products based on which store they are assigned to. How do I detect in my code which store a product is assigned to?

Thanks!

UPDATE: Okay, I think I found a way to do it - by assigning different root categories to the different stores. The root category can then be both assigned in the backend and detected in code. Do you think this method works, or am I on the wrong track? Thanks!

标签: magento
2条回答
贼婆χ
2楼-- · 2019-08-28 03:03

Make the storefronts and add all products to your default storefront then switch store scope and disable/enable your items on storefronts that they belong.

website (GERMANY) - store 1 - store 2 - store 3 - store 4 - store 5

If you get the product collection you can add store filter to it and filter by store-code/id

查看更多
仙女界的扛把子
3楼-- · 2019-08-28 03:08

I found a way to do it - by assigning different root categories to the different stores. The root category can then be both assigned in the backend and detected in code.

查看更多
登录 后发表回答