Filters URL - weird reset

  • Posts: 46
  • Thank you received: 2
4 years 2 months ago #324081

-- HikaShop version -- : 4.3
-- Joomla version -- : 3.9.21
-- PHP version -- : 7.3.22

Hello,
I use 2 different filter modules. Each of these 2 pages has its filter module.
Each module calls a different filter and a different menu redirect as well.
After a choice in a filter you can "reinitialize" the filter. After doing that, here are the URLs that are displayed:
1) www.mysite.com/accessoires.html?limitsta...es_1=&filter_Size_7=
2) www.mysite.com/boutique.html?filter_Cate...es_1=&filter_Size_7=

Strange thing, I notice in the url the name of the 2 filters activated from the Hika backend. "Size_7" and "Categories_1"
Why are the end of these 2 URLs the same?

Besides, if I publish a third filter (Size_3), without using it, well it is added to the URL:
www.mysite.com/boutique.html?filter_Cate...ze_3=&filter_Size_7=

how to get more friendly urls with filters?
Should I use a 301 redirect?

edit:
I am currently subscribing to the "categories_1" filter because it is irrelevant. I keep the second "Size_7" Wood species.
the "reiniatilsation" button generates a new URL

Thank you in advance for your advice

Last edit: 4 years 2 months ago by philament.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 2 months ago #324095

Hi,

The URL for the reset includes the default value of all the filters. The fitler system doesn't know where you're coming when it does the reset so it adds all the filters in the URL to make sure that all of them are reset.

Regarding the name of the parameters in the URL, the system uses the namekey of the filters. So you could change the namekey of the filters in the hikashop_filter table in your database via PHPMyAdmin to have then how you want.
Note that each filter must have a unique namekey, not used by other filters for the system to work properly.

The following user(s) said Thank You: philament

Please Log in or Create an account to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum