Strang back button behaviour in Google Chrome

  • Posts: 17
  • Thank you received: 0
  • Hikashop Business
3 months 1 week ago #307493

-- HikaShop version -- : 4.1.0
-- Joomla version -- : 3.9.6
-- PHP version -- : 7.1.25
-- Browser(s) name and version -- : Chrome 75.0.3770.80
-- Error-message(debug-mod must be tuned on) -- : No error, but strange back-button behaviour

Hi,

I know it is bad practice, but some users do use the back-button in the browser.

In Google Chrome there is a strange behaviour when using the back-button and filters. Google Chrome remembers the first filter when you use the back-button in the product list and then use another filter. In Firefox the behaviour is as expected: the first filter is deleted.

See the screen-shots.

Regards,
Peter

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

  • Posts: 66841
  • Thank you received: 9874
  • MODERATOR
3 months 1 week ago #307496

Hi,

If you want to avoid "issues" with the back button when using filters, you can activate the "redirect POST mode" setting of the HikaShop configuration.
That way, the filters selection will go through the URL and that will prevent the "back" button issue.

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

  • Posts: 17
  • Thank you received: 0
  • Hikashop Business
3 months 6 days ago #307550

Thanks, but unfortunately it did not work as expected. After enabeling the the "redirect POST method" the effect is the same in Google Chrome as you can find out on the website. In Firefox the back-button works as expected.

Best regards,
Peter

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

  • Posts: 66841
  • Thank you received: 9874
  • MODERATOR
3 months 5 days ago #307554

Hi,

Try changing the line:
$url = $this->addParametersToUrl(hikashop_currentURL(),$parameters);
to:
$url = $this->addParametersToUrl(hikashop_currentURL(),$parameters).'&filtered=1'';
in the file components/com_hikashop/views/product/view.html.php and that might help.

Note that we're actually working on having AJAX supported for filters with the next version of HikaShop. This will make it so that the listing will refresh without changing the page. So the back button will redirect to the page before you accessed the listing, and not the previously filtered listing page. So you won't have the problem anymore since it will work differently.

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

  • Posts: 17
  • Thank you received: 0
  • Hikashop Business
3 months 4 days ago #307636

Hi,

Thank fot the effort, but still not the solution. Ik can see the 'filtered=1' parameter in the URL, but after hitting the back-button and clicking on another filter on the Hikashop Filter Module the previous filter is still checked.

For me it is OK if we wait for the next version with the AJAX implementation.

Best regards,
Peter

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

Time to create page: 0.059 seconds
Powered by Kunena Forum