Magento:同一商店下不同商店视图中的不同产品?
我有多个网站、多个存储的 Magento 商店,并且我需要在一个 store_view 中提供某些产品,但在另一个 store_view 中不可用,其中两个 store_view 都是同一商店和网站的一部分。
我的所有产品都可以通过附加的简单产品进行配置。我能想到解决这个问题的唯一方法是注册一个新的产品属性,通过它我可以控制每个产品的去向。这对于产品目录和列表非常有用,但我在单一产品视图和选择可配置产品选项方面遇到了巨大的问题。
我似乎找不到 Magento 核心中生成这些选项的位置,因此我可以覆盖它并严格每个商店视图的一些选项。基本上,我需要知道这个
是在哪里生成的。我的最后一招是通过 AJAX 进行管理,但该页面中已经有很多 AJAX 代码和调用,这会令人困惑。
任何帮助或提示将不胜感激。
I have multi website, multi stored Magento shop, and I have a need to make some products available in one store_view, but not available in the other, where both store_views are part of the same store and website.
All my products are configurable with simple products attached to them. Only way I could think of solving this is registering a new product attribute through which I control where each product goes. That works great for the catalog and lists of products, but I have huge problems with single product view and choosing the configurable product options.
I can't seem to find where in Magento core those option are generated, so I could override that and strict some options for each store view. Basically, I need to know where is this
generated. My last resort would be managing this through AJAX, but there is already a lot of AJAX code and calls in that page that it would be confusing.
Any help or tip would be very appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我非常确定上述方法不起作用,因为属性启用/禁用产品在网站级别有影响,而不是商店或商店视图!
因此,如果您确实像 Tomakun 所说的那样,该产品将在整个网站上被禁用,而不仅仅是您首先选择的商店视图!
我有同样的问题,我想将不同的产品全部分配给一个网站,但分配给不同的商店。
到目前为止,我刚刚找到了上面的解决方案来更改商店视图级别的可见性。
但我认为这不是最佳解决方案。应该可以在商店级别禁用产品!
I am pretty sure that the way above is not working because the attribute enable/disable product has impact at website level and not store or store view!
So if you do like tomakun says the product will be disabled at the whole website and not just for the store view you choose first!
I have the same problem that I want to assign different products all to one website but to different stores.
So far I just found the solution above to change the visibility at store view level.
But I think this not the optimal solution. It should be possible to disable a product on store level!
Magento 中默认已提供此功能。
对于特定商店视图批量启用/禁用产品,请执行以下操作:
您现在正在查看此商店视图中包含的所有产品。
执行此操作将从所选商店视图中启用或禁用所选产品(步骤 2)。这对于批量操作很有用,但您也可以对所有产品一一执行相同的操作:
打开您的产品,选择页面左上角的相关商店视图。然后在“常规”选项卡中,您可以看到状态:“已启用”或“已禁用”。选择要应用于当前商店视图的选项,然后单击“保存”。
就是这样!
This feature is already available by default in Magento.
For bulk enabling/disabling products for a particular store view, do the following:
You are now viewing all products included in THIS store view.
Doing this will Enable or Disable the selected products from the selected store view (step 2). This is good for bulk actions but you can also do the same for all products one by one:
Open your product, select the relevant store view on top left of the page. Then in the General Tab, you have status: Enabled or Disabled. Choose the option that you want to apply for the current store view and hit Save.
That's it!