Catalog filter

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!
Harpal Singh
Posts: 28
Joined: 21 May 2019, 09:52

Catalog filter

Post by Harpal Singh » 22 Oct 2019, 10:51

Is it possible to write my own routes/urls for search or other filters.
Rather than

Code: Select all

../list?f_attrid[0]=332&f_name=abc&f_catid=279
I want to create a URL like

Code: Select all

list?company_id=332&cat_name=lanyards&cat_id=279
Last edited by Harpal Singh on 29 Oct 2019, 08:05, edited 1 time in total.

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

Re: Catalog filter pretty urls

Post by aimeos » 23 Oct 2019, 08:20

You can adapt the Laravel routes:
https://aimeos.org/docs/Laravel/Custom_routes

But to change the parameter names (e.g. from f_catid to cat_id) you would need to change the templates and the HTML client classes that process the parameters.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Harpal Singh
Posts: 28
Joined: 21 May 2019, 09:52

Re: Catalog filter

Post by Harpal Singh » 29 Oct 2019, 10:22

Code: Select all

../list?f_attrid[0]=332&f_name=abc&f_catid=279
In the above URL I want to change query string from array to string because URL does not look pretty with array-like: `f_attrid[0]=332`.

Thanks

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

Re: Catalog filter

Post by aimeos » 30 Oct 2019, 07:16

You can try to change the Laravel router behavior in some way to transform array parameters differently when generating and resolving URLs.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply