- Posts: 217
- Thank you received: 4
Javascript error when clicking on remove filter
- FilipHradil
-
Topic Author
- Offline
Less
More
7 years 2 months ago - 7 years 2 months ago #309190
by FilipHradil
Javascript error when clicking on remove filter was created by FilipHradil
-- 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
-- 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
Last edit: 7 years 2 months ago by FilipHradil.
Please Log in or Create an account to join the conversation.
7 years 2 months ago #309194
by nicolas
Replied by nicolas on topic Javascript error when clicking on remove filter
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.
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.
- FilipHradil
-
Topic Author
- Offline
Less
More
- Posts: 217
- Thank you received: 4
7 years 2 months ago #309243
by FilipHradil
Replied by FilipHradil on topic Javascript error when clicking on remove filter
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
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
Please Log in or Create an account to join the conversation.
7 years 2 months ago #309249
by nicolas
Replied by nicolas on topic Javascript error when clicking on remove filter
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.
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.
- FilipHradil
-
Topic Author
- Offline
Less
More
- Posts: 217
- Thank you received: 4
7 years 2 months ago #309366
by FilipHradil
Replied by FilipHradil on topic Javascript error when clicking on remove filter
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
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.
Less
More
- Posts: 12953
- Thank you received: 1778
7 years 2 months ago #309374
by Mohamed Thelji
Replied by Mohamed Thelji on topic Javascript error when clicking on remove filter
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
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.
- FilipHradil
-
Topic Author
- Offline
Less
More
- Posts: 217
- Thank you received: 4
7 years 2 months ago #309385
by FilipHradil
Replied by FilipHradil on topic Javascript error when clicking on remove filter
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.
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.
Less
More
- Posts: 12953
- Thank you received: 1778
7 years 2 months ago #309403
by Mohamed Thelji
Replied by Mohamed Thelji on topic Javascript error when clicking on remove filter
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.
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.
- FilipHradil
-
Topic Author
- Offline
Less
More
- Posts: 217
- Thank you received: 4
7 years 2 months ago #309459
by FilipHradil
Replied by FilipHradil on topic Javascript error when clicking on remove filter
Thank you so much. It looks fine now! 
Filip
Filip
Please Log in or Create an account to join the conversation.
Time to create page: 0.227 seconds