Price Filter has lost its values

  • Posts: 70
  • Thank you received: 4
3 years 5 months ago #325384

-- url of the page with the problem -- : srtdesigns.co.uk/wedding
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.22
-- PHP version -- : 7.3.23
-- Browser(s) name and version -- : various

I was creating some new products when I noticed the Price Filter which usually shows £0 - £20 with a green bar between the prices has disappeared. It worked fine before and the only thing I can think is the latest version of Joomla has been installed since last checked. Any ideas?

Attachments:

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 5 months ago #325385

Hi,

I think it comes from the javascript error you have on the page:
monosnap.com/file/BWiLAcWNs96u1pedlDu6vnoJVVokN6
That stops the browser from running the rest of the javascript code on the page, including the bit to initialize the filter selector.

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

  • Posts: 70
  • Thank you received: 4
3 years 5 months ago #325489

Thanks but that means nothing to me. It has just stopped working and I do not write javascript so no idea what do to next.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 5 months ago #325500

Hi,

Well, I'm not sure what to do exactly either.
The first javascript error seems to be linked to the chosen library of Joomla.
So if you have the "use chosen library" setting activated in the HikaShop configuration, turn it off. And if not, it might be your template adding it to the pages on your website frontend, so you would have to check with your template provider.
And the second javascript error seems to come from the code added at the end of the page for Google Analytics. Now I don't know how that is added there on your end. It could be a plugin, an option of the template, a copy/paste added somewhere in the template, or a module.
The code for Google Analytics is invalid. So I suppose it is a wrong copy/paste.

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
3 years 1 month ago #330688

Hi,
I have the same problem since updating to an RCA gantry 5 template. There's a jquery error on the page but I can't figure out what's causing it.

Site link.

I'll pm an admin logon if you need one.

Many thanks,
Ian and Stu

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

  • Posts: 4502
  • Thank you received: 610
  • MODERATOR
3 years 1 month ago #330743

Hello,

Please process a test with a default template (like ProtoStar) to see if that change something to your issue.
If yes, this is linked to your template, see with your template provider support.
If not, maybe another plugin is in conflict with HikaShop Javascript.
Have you ever made this feature work normally in the past ? Or is it the first time you try to use it ?...
And if, it used to work did you process an update recently or add any components ?...

Awaiting your returns to be able to progress on your subject.
Regards

Last edit: 3 years 1 month ago by Philip.

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
3 years 1 month ago #330751

Hi,
we updated to the RCA template (gantry 5) recommended in the Hikashop help. The filter did work on our previous rocketheme (gantry 5) template. I'll try the RCA forum but most questions about the filter (in their forum) are referred back to this forum.

Regards,
Ian and Stu

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 1 month ago #330817

Hi,

If you check the javascript code for the cursor filter on the page, you can see this:
i.imgur.com/obpjdH7.png
As you can see there, between the parameter name and the parameter value, the ":" is missing for all the parameters.
So for example, instead of:
step 1
you should have:
step: 1

This comes from the code:

$params.="\r\n".$key.': '.$option.',';
in the file administrator/components/com_hikashop/classes/filter.php
So either that code was modified to remove the ":" (which is highly unlikely, or there is something processing the HTML/JS code on the page and stripping out the ":" from there.
Now, if I look at the source of the page with my browser, I do see the ":" there:
i.imgur.com/sliw8T5.png
So that means that it's some javascript loaded on the page which modifies the javascript of HikaShop before it is run and breaks it.
Now, if I look at your template's JS file: bmcpharm.com.au/templates/r_shopin/js/template.min.js?6046cdc9
I see this at the end:
$('#g-sidebar div.hikashop_filter_main').html(function(i, html) {
        return html.replace(/\:/g,'');
    });
i.imgur.com/pxHsHe4.png
This code is made specifically to remove the ":" from the filter area of HikaShop and thus breaks the javascript code there...

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
3 years 1 month ago #330825

Thanks for looking into that. I'll pass it on to RCA Themes support to see if they can amend the template.

Regards,
Ian and Stu

The following user(s) said Thank You: Philip

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
3 years 1 month ago #330858

Hi,
the guys from RCA Themes manually fixed the error on my site but aren't sure how it was caused at the moment. I've included their response below in case it helps others.


I removed the JS code used to remove the colon : from your template and applied css to hide the colon and it's fixed now.

However, I'm not sure why it's making issue on your site, it could be conflicting with something else or the template's js file loading before the HikaShop js file.
As you can see on the demo site here estore.rcatheme.com/toys-kids-baby the price range slider is working with the JS code used to remove the the colon :.
Regards,
Ian and Stu

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 1 month ago #330864

Hi,

Tha's because they are using an old version of HikaShop on their demo website.
In order to add the compatibility with Joomla 4, we had to move the javascript code inline instead of adding it in the header of the pages.
So on the demo website with the old version, the javascript from the template doesn't modify the javascript code of the filter as it is in the header, while on your website with the latest version of HikaShop, the javascript from the template creates that issue with the javascript code of the filter as it is directly next to the filter's HTML.

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

  • Posts: 173
  • Thank you received: 14
  • Hikashop Business
3 years 1 month ago #330903

Hi,
I'll pass this on and, hopefully, they can adjust their template.

Many thanks,
Ian and Stu

The following user(s) said Thank You: Philip

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

Time to create page: 0.092 seconds
Powered by Kunena Forum