Product Main Category
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 38
- Joined: 10 Oct 2024, 12:51
Product Main Category
Hello everyone,
Is there already a way to define a main category for a product when it belongs to multiple categories? Right now, on the product detail page, the first category (alphabetically) is displayed by default.
It would be useful to have an option to set a primary category for each product. If this feature doesn’t exist yet, I might need to implement it myself.
Has anyone already tackled this, or is there a recommended approach?
Thanks!
Is there already a way to define a main category for a product when it belongs to multiple categories? Right now, on the product detail page, the first category (alphabetically) is displayed by default.
It would be useful to have an option to set a primary category for each product. If this feature doesn’t exist yet, I might need to implement it myself.
Has anyone already tackled this, or is there a recommended approach?
Thanks!
Re: Product Main Category
You could add a key/value pair to the list item connecting the product and the catalog with "main: 1" for example. Then, in the templates, you have to filter for that value to display/use only the that category.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

-
- Posts: 38
- Joined: 10 Oct 2024, 12:51
Re: Product Main Category
I came to the solution by adding a house icon to categories and if you click on it it writes an entry in the product config with cat = catcode which i use in frontend.