Javascript error when clicking on remove filter

  • Posts: 217
  • Thank you received: 4
4 years 8 months ago #309190

-- url of the page with the problem -- : elodyprsteny.cz/snubni
-- HikaShop version -- : 4.2.0

Hello,

I experienced javascript errors when clicking "remove filter" for the patricular filter. Actually, this problem is only for 1 filter which is a checkboxes of custom fields. Please, check the link of my website and screenshots. This error caused that I can't remove filter.





Other buttons (remove filter) on this product page works as expected.

Thank you,
Filip

Attachments:
Last edit: 4 years 8 months ago by FilipHradil.

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
4 years 8 months ago #309194

Hi,

This looks like a customization issue:
monosnap.com/file/th7kaWZ5XUxt4BVR9ei4k1QBduYiWJ
The input field which is referenced for the remove filter button seems to be commented out with HTML comment tags. And that's not in HikaShop by default.

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

  • Posts: 217
  • Thank you received: 4
4 years 7 months ago #309243

Hello Nicolas,

Thank you very much. You are right, it was caused by my customization in classes/filter.php

I tried to remove " > " before selected item and ", " after it. I already managed the first one, but I am not able to remove the comma, it always causes the same error. Maybe, could you advise me how to do that, please? I don't know how that works and why this error is occurring.



Thank you in advance,
Filip

Attachments:

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
4 years 7 months ago #309249

Hi,

If you check the displayInList function in class.filter, you'll see many commas after </a> closing tags :
monosnap.com/file/8C59Yu2eHm4yr1aNJYnWMxTk4825xb
These are the ones you want to delete. You don't want to remove other commas in that function, only the ones after these </a> tags.

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

  • Posts: 217
  • Thank you received: 4
4 years 7 months ago #309366

Hello Nicols,

thank you very much for advise. I tried it again, many times, but it doesn't work as you described. Please, check in this video:
www.loom.com/share/eff3851733d04c2cadd5d9a64bf31611

In function you are talking about, there is section commented with //DISPLAY FIELDS

I removed comma and space here:
$html.='> <a class="hikashop_filter_list_selected" style="font-weight:bold">'.JText::_($val[1]).'</a>, '; and few lines under here
$html.='> <a class="hikashop_filter_list_selected" style="font-weight:bold">'.$value.'</a>, ';

It looks that the comma is somehow tied with functionality to me. If you need to check, I sent you my backend and FTP access a few days ago.

Please, let me know what I can do with it.


Thank you very much for your help,
Filip

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

  • Posts: 12953
  • Thank you received: 1778
4 years 7 months ago #309374

Hello Filip,

Thank you for your temporary FTP access, we just fixed it on your website.

We wish you a nice day,
Kind regards,
Mohamed Thelji

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

  • Posts: 217
  • Thank you received: 4
4 years 7 months ago #309385

Hello,

I am really really sorry. Before you wrote, I updated Hikashop and maybe it rewrote your fix. Please, could you send me fixed file again, please?

Again, sorry for complications,

Thank you,
F.

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

  • Posts: 12953
  • Thank you received: 1778
4 years 7 months ago #309403

Hello,

No problem, we just re-applied it on your website, so it should work fine again.

We wish you a nice day,
Kind regards,
Mohamed Thelji.

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

  • Posts: 217
  • Thank you received: 4
4 years 7 months ago #309459

Thank you so much. It looks fine now! :-)

Filip

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

Time to create page: 0.097 seconds
Powered by Kunena Forum