- Posts: 217
- Thank you received: 4
Unfriendly url after filtering
- FilipHradil
-
Topic Author
- Offline
-- HikaShop version -- : 2.3.5
Hello,
I just upraged my hikashop essential to business version.
I tried to add some filters and after filtering url looks like:
before filtering:
desired url
is it possible to make it?
Thank you in advance!
Filip
Please Log in or Create an account to join the conversation.
Please see the "redirect POST mode" setting.
www.hikashop.com/support/support/documen...g.html#main_advanced
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- FilipHradil
-
Topic Author
- Offline
- Posts: 217
- Thank you received: 4
Is there any way how to customize/shorten url or hide unused filters in url?
Thank you!
Please Log in or Create an account to join the conversation.
The parts component/hikashop and ?Itemid=0 comes from the fact that you didn't enter any menu item id in the correspoding setting of your filtering module.
The product/listing part is necessary but can be simplified as well. Specially with the Itemid being set to a products listing menu item, it will normally be removed automatically.
For the filters, not much can be done. The parameters are necessary for the filtering system to work properly in all the cases.
That's why by default we don't activate the filter parameters in the URLs as it can get messy if you have a lot of filters, pagination, etc.
Please Log in or Create an account to join the conversation.
- FilipHradil
-
Topic Author
- Offline
- Posts: 217
- Thank you received: 4
thank you very much for your reply, Nicolas.
- If Messy url - nevermind, but if I filter once and then click on filter button again it redirect me on homepage url:
Code:http://elody.cz/index.php?filter_Styl=+&filter_Styl%5B%5D=uzke&filter_Raminka___rukavy=+&filter_Zdobnost=+&filter_Krajka=+&filter_Cena=&filter_Cena_values=6000+-+14000&return_url=http%3A%2F%2Felody.cz%2Findex.php%3Ffilter_Styl%3D%2B%26filter_Styl%255B%255D%3Duzke%26filter_Raminka___rukavy%3D%2B%26filter_Zdobnost%3D%2B%26filter_Krajka%3D%2B%26filter_Cena%3D%26filter_Cena_values%3D6000%2B-%2B14000%26return_url%3Dhttp%253A%252F%252Felody.cz%252Fobchod%26filtered%3D1%26reseted%3D0&filtered=1&reseted=0
- I placed filters in module but the problem is that the module is shown in product page, is there any way how to show it only on product listing?
Can you recommend me how to solve it, please?
Filip
Please Log in or Create an account to join the conversation.
- Do you have many filters on the same page ? We were not able to reproduce your issue on our end. So please give us full details on our settings
- To have a module only on a listing and not on a product page, please use "advanced module manager" which has an integration with us.
Please Log in or Create an account to join the conversation.
- FilipHradil
-
Topic Author
- Offline
- Posts: 217
- Thank you received: 4
thank you.
Now, I have just problem with extending url by every filtering.
See my sublast post in this thread, please:
www.hikashop.com/forum/product-category-...ront-end.html#204788
Thank you!
Please Log in or Create an account to join the conversation.
Add the code:
Please Log in or Create an account to join the conversation.
- FilipHradil
-
Topic Author
- Offline
- Posts: 217
- Thank you received: 4
thank you. But it did not solve the problem.
Code after few filtering:¨
Please Log in or Create an account to join the conversation.
I beg to differ.
Your issue was that the return_url parameter kept on being added over and over, making the URL bigger and bigger.
This is not the case anymore.
But I couldn't understand why that parameter was still added. I thus didn't some tests on my end and didn't had the issue at all. Then I debugged the issue on your website and found out that you had changed the method of the filter form to "get" instead of "post" in the filter view file and thus the form was adding the return_url parameter to the URLs.
So the issue actually comes from a modification you did to the view file.
I've actually tried to revert your change and it seems that it breaks the filters modification capability. Maybe due to another modification or a bug fixed since then ( as you're on the 2.4.0).
So I would recommend to keep it like this and live with it. It should not change anything for SEO anyway.
Please Log in or Create an account to join the conversation.
- FilipHradil
-
Topic Author
- Offline
- Posts: 217
- Thank you received: 4
thank you very much. I appreciate your help.
I changed get method to post in filter view and it does the trict.
Url is now very short.
Best Regards
Filip
Please Log in or Create an account to join the conversation.
- FilipHradil
-
Topic Author
- Offline
- Posts: 217
- Thank you received: 4
sorry Nicolas, it is not still ok. When I set more parameters for one filter it do not show any results.
Before (with long url) it was alright.
Any idea please?
Filip
Please Log in or Create an account to join the conversation.
I've added a patch in order to have the filters to work with several values.
It's working on your website now.
Please Log in or Create an account to join the conversation.
- FilipHradil
-
Topic Author
- Offline
- Posts: 217
- Thank you received: 4
thank you! Now it's perfect!
Please Log in or Create an account to join the conversation.