`categories` 和 `mainCategories` 在 Shopware 6 中的区别是什么?

huangapple go评论118阅读模式
英文:

Difference between `categories` and `mainCategories` in Shopware 6?

问题

categoriesmainCategories在Shopware 6中有什么区别?

我在参考文档中没有找到关于这两者之间的区别的信息:

https://docs.shopware.com/en/shopware-6-en/catalogues/categories#category-overview

在API文档中也没有任何提示:

https://shopware.stoplight.io/docs/admin-api/1653192ca59cb-create-a-new-category-resources

在管理员界面中也没有明确解释它们的含义的任何内容。

英文:

What are the differences between categories and mainCategories in Shopware 6?

I don't find anything in the references about that difference:

https://docs.shopware.com/en/shopware-6-en/catalogues/categories#category-overview

Nor any hint in the API docs

https://shopware.stoplight.io/docs/admin-api/1653192ca59cb-create-a-new-category-resources

Nor anything in the admin GUI that makes their meaning clear.

答案1

得分: 2

categories是所有明确分配给产品的类别。

mainCategories是可选的,仅与产品的SEO设置相关。假设您为单个产品分配了多个类别。您的SEO友好的URL应包括类别的面包屑,例如/clothing/men/tshirts/my-product。由于分配了多个类别,您可以通过设置主类别来决定应该使用哪个类别作为面包屑。而且,由于您可以为每个销售渠道设置不同的SEO URL,因此每个产品可能还可以有多个主类别,但每个销售渠道最多只能有一个。

英文:

categories are all categories explicitly assigned to the product.

mainCategories are optional and only relevant for the SEO settings of a product. Let's say you have multiple categories assigned to a single product. Your SEO-friendly URL should include the breadcrumb of the category for example /clothing/men/tshirts/my-product. Since there are multiple categories assigned, you can decide which category should be used for the breadcrumb by setting the main category. And since you could have a different SEO-URL for each sales channel, there could also be multiple main categories per product, but at most one per sales channel.

huangapple
  • 本文由 发表于 2023年8月10日 17:31:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76874430.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定