Catalog tree - One product in category - link to detailpage

How to configure and adapt Aimeos based shops as developer
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!
heural
Posts: 58
Joined: 09 Jun 2022, 07:55

Catalog tree - One product in category - link to detailpage

Post by heural » 09 Mar 2023, 10:04

Hi Aimeos-Team,

if only one product is in a category, is it possible to link the navigation (catalog/tree) for this category directly to the detail page of the product instead of shop/list? The shop/list page shows logically only this one product and its useless in this case.

Is there a way to get the product(s) of a category in ai-client-html/templates/client/html/catalog/filter/tree-partial.php
to determine the catalog-link (line 110)?

Thank you!

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: Catalog tree - One product in category - link to detailpage

Post by aimeos » 10 Mar 2023, 09:25

heural wrote: 09 Mar 2023, 10:04 if only one product is in a category, is it possible to link the navigation (catalog/tree) for this category directly to the detail page of the product instead of shop/list? The shop/list page shows logically only this one product and its useless in this case.

Is there a way to get the product(s) of a category in ai-client-html/templates/client/html/catalog/filter/tree-partial.php
to determine the catalog-link (line 110)?
Not really as counting the products for the categories upfront (currently it's done async with a second request) would be a big performance problem if you have many products. If you only have a few one and a few categories, you may add the counts to the view using a decorator for the catalog/filter component.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply