You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
To construct breadcrumbs and URL's it's useful to have a primary collection for each product, in case a product is part of multiple collections.
Describe the solution you'd like
I would like the field Product.primaryCollection to return the primary collection of a product
The primary collection of a product is the collection that is the highest placed collection in Vendure (Collection's are sortable in Vendure, and it's a good practice to sort by importance).
E2e test: Create 2 categories, place product in both categories, querying product.primaryCollection should always be the highest placed collection.
Code has already been used in another project, ready to copy/paste. See below for snippet.
Is your feature request related to a problem? Please describe.
To construct breadcrumbs and URL's it's useful to have a primary collection for each product, in case a product is part of multiple collections.
Describe the solution you'd like
Product.primaryCollection
to return the primary collection of a productAdditional context
Shop API schema:
Resolver code (feel free to change or improve where necessary):
⬆️ Sort by most popular according to Googles UX retail playbook
The text was updated successfully, but these errors were encountered: