如何更改每个商店视图的类别位置

发布于 2024-10-11 10:37:42 字数 314 浏览 4 评论 0原文

有谁能够更改 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

错爱 2024-10-18 10:37:42

这是不可能的。

类别实体具有实际上是静态的属性“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文