How to keep the current catalog when filter was applied?

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
akropivko
Posts: 36
Joined: 20 Jan 2021, 12:49

How to keep the current catalog when filter was applied?

Post by akropivko » 21 Apr 2021, 10:35

Hi!
Aimeos 2020.10, Laravel

Could you please provide me with a tip how I can apply the catalog filter for the current catalog ONLY, excluding all parent catalogs?
For example,
we are inside the "man~4" catalog: http://127.0.0.1:8000/shop/man~4
Applying a filter changes this URL to something like http://127.0.0.1:8000/shop?f_attrid%5B%5D=40...
But I'd like to KEEP the initial catalog id: http://127.0.0.1:8000/shop/==man~4==?f_attrid%5B%5D=40...
Commonly say, I need a way to apply the catalog filter just for the current catalog only.

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

Re: How to keep the current catalog when filter was applied?

Post by aimeos » 24 Apr 2021, 09:16

Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

akropivko
Posts: 36
Joined: 20 Jan 2021, 12:49

Re: How to keep the current catalog when filter was applied?

Post by akropivko » 07 May 2021, 10:50

It seems there is a bug here.
Enabling this config option (client/html/catalog/filter/tree/force-search = 1)
Screenshot_11.jpg
Screenshot_11.jpg (8.62 KiB) Viewed 1425 times
adds a new parameter f_catid to URL, but also causes error
Missing required parameters for [Route: aimeos_shop_tree] [URI: shop/{f_name}~{f_catid}]
Screenshot_10.jpg
Screenshot_10.jpg (38.79 KiB) Viewed 1425 times
This error can be easy resolving by setting the route params to obligatory using "?"
Screenshot_12.jpg
Screenshot_12.jpg (11.47 KiB) Viewed 1425 times
Screenshot_13.jpg
Screenshot_13.jpg (34.27 KiB) Viewed 1425 times
But I'm not sure if this is correct behavior when a new config option is applied.
Is this a bug?

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

Re: How to keep the current catalog when filter was applied?

Post by aimeos » 07 May 2021, 11:19

This problem has been fixed in aimeos/ai-client-html:2020.10.20 and later.
Please update you installation and make sure that your customized tree template contains:
https://github.com/aimeos/ai-client-htm ... hp#L67-L70
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply