如何更改每个商店视图的类别位置
有谁能够更改 Magento 中每个商店视图的类别位置吗?我还没有查看有关如何设置位置的代码,但我知道您通过管理站点使用类别树设置位置。目前,您无法为不同的网站或商店视图更改此树。我尝试将数据库中的属性 is_global 列更改为商店视图编号,但是当我尝试按商店视图更改它时,这不起作用。我假设后端的代码没有逻辑来查找它是什么商店视图并分配它,因为他们将其标记为全局并且不给您更改它的选项。
我有两个具有相似层次结构的网站,使用相同的根目录是有意义的,而不是复制树的大部分内容并必须将产品分配给这两个网站。理想情况下,能够通过管理员更改位置是最好的,这样将来客户就可以移动类别而无需接触任何代码。
Has anyone been able to change the position of categories per store view in Magento? I haven't looked yet at the code on how the position gets set, but I know you set the position through the admin site with the category tree. You currently out of the box can't change this tree for different websites or store views. I tried changing the attributes is_global column in the database to the store view number, but that didn't work when I tried changing it per store view. I am assuming the code on the backend doesn't have the logic to look for what store view it is and assign it since they have it marked as global and don't give you the option to change it.
I have two websites that have similar hierarchies and it is going to make sense to use the same root catalog rather then duplicating so much of the tree and having to assign the products to both. Ideally being able to change the position through the admin would be best so that in the future the client can move a category without having to touch any code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是不可能的。
类别实体具有实际上是静态的属性“position”(这意味着该属性位于主catalog_category_entity 表中)。此外,我们在主表中有“路径”列用于定义类别关系。
这两列是类别位置的基础。
关于属性:您是否尝试更改catalog_eav_attribute中每个属性的值?此表中的“位置”列用于前端的分层导航(但不推荐使用此属性)。
因此,在我看来,只有通过定制,我们才能改变这种逻辑。
欢迎提问。
It is impossible.
Category entity has attribute 'position' which is actually static (it means that the attribute is in the main catalog_category_entity table). Also we have 'path' column in the main table for defining categories relation.
This two column is the base for category position.
About attributes: Did you tried to change values per attribute in the catalog_eav_attribute? Column 'position' in this table used for layered navigation on the frontend (but this attribute is deprecated).
So, on my point of view only with customization we can change this logic.
Feel free to ask questions.