Cursor filter incorrect in URL

  • Posts: 200
  • Thank you received: 75
6 years 11 months ago #270036

-- HikaShop version -- : 3.0.1 [1705161239]
-- Joomla version -- : 3.7.1

Hi,

we have a small issue when resetting a cursor filter.
We have "Redirect POST mode" set to Yes so the filter parameters show up in the URL.

If we have a cursor filter from 0 - 100 and set it for example to 40 - 100, everything is fine and the URL is updated. When we then try to delete the filter, the cursor moves back to its original position 0 - 100 correctly and the products show correctly, but the URL stays at 40 - 100. The URL does not get updated correctly to 0 - 100, can you reproduce the issue?
In our case this is a bit of a problem since our template will retrieve the GET parameters to show the user what he's currently filtering, which can because of this cause some confusion.


Another small issue: even with "Deletable filter" set to No, the cursor filter will still show an "X" delete button. We can hide it with CSS, but we thought it shouldn't be showing at all with Deletable set to no, so just thought we'd mention it.

Thank you in advance.

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

  • Posts: 81540
  • Thank you received: 13070
  • MODERATOR
6 years 11 months ago #270060

Hi,

1. Yes and no.
The values of the filter indeed stay in the URL.
However, if you look at the URL, there are actually two parameters for cursor filters:
filter_pricefilter_2=1&filter_pricefilter_2_values=0%20-%20223
The first one tells if the filter is being used or not, and the second one provides the values for the filter.
So when you click on the delete icon, what it does is that it sets the first parameter to empty and doesn't change the second one (since it's not necessary as the first one already disables the filter).
The best would be for the template to take that into account as that's how the system is supposed to work.

2. The name of the option doesn't really correspond to its function. What the option does is that it actually changes the way the filter is displayed when the user has selected something in the filter. The name should be changed, although I'm not sure what we should put instead.

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

  • Posts: 200
  • Thank you received: 75
6 years 11 months ago #270066

1. Ah yes that makes sense, thanks.

2. Ok we know what you mean. Instead of changing the name, perhaps more importantly the documentation could be clearer, now it states "if that option is turned on there is a delete icon next to the filter in order to cancel it", which isn't really what it does.
Perhaps might be changed to something like:

Deletable filter : If that option is turned on, when a filter has been used, it will only display the selected filter values with a delete button. Turned off, it will always display all filter values.


But all is clear now, thank you.

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

Time to create page: 0.063 seconds
Powered by Kunena Forum