- Posts: 54
- Thank you received: 2
Comparison product error
- consultech
-
Topic Author
- Offline
Less
More
11 years 2 months ago #209908
by consultech
Comparison product error was created by consultech
-- HikaShop version -- : latest
-- Joomla version -- : 2.5.26
-- PHP version -- : 5.4.40
-- Error-message(debug-mod must be tuned on) -- : Uncaught SyntaxError: missing ) after argument list
Hello,
After update hikashop business with latest update I have an error : in listing product when you check box to compare products, button to view comparison don't show and js error : Uncaught SyntaxError: missing ) after argument list
can you check please.
Thank-you
-- Joomla version -- : 2.5.26
-- PHP version -- : 5.4.40
-- Error-message(debug-mod must be tuned on) -- : Uncaught SyntaxError: missing ) after argument list
Hello,
After update hikashop business with latest update I have an error : in listing product when you check box to compare products, button to view comparison don't show and js error : Uncaught SyntaxError: missing ) after argument list
can you check please.
Thank-you
Please Log in or Create an account to join the conversation.
11 years 2 months ago #209911
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Comparison product error
Hi,
Your product have a single quote in their name, which is the source of your javascript syntax error.
HikaShop perform an "escape" on the product name in order to avoid such kind of issue but the single quotes are not managed by that Joomla function.
So in the view you're using for the listing, you need to replace
By
And it should fix your JS issue.
Otherwise, I don't think that the HikaShop update is the cause of your issue, because that piece of code didn't changed.
Regards,
Your product have a single quote in their name, which is the source of your javascript syntax error.
HikaShop perform an "escape" on the product name in order to avoid such kind of issue but the single quotes are not managed by that Joomla function.
So in the view you're using for the listing, you need to replace
Code:
onchange="setToCompareList(<?php echo $this->row->product_id;?>,'<?php echo $this->escape($this->row->product_name); ?>',this);"
Code:
onchange="setToCompareList(<?php echo $this->row->product_id;?>,'<?php echo addslashes($this->escape($this->row->product_name)); ?>',this);"
Otherwise, I don't think that the HikaShop update is the cause of your issue, because that piece of code didn't changed.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- consultech
-
Topic Author
- Offline
Less
More
- Posts: 54
- Thank you received: 2
11 years 2 months ago #209942
by consultech
Working again.
Thank you Jerome for your support.
have a nice day.
Jean-Michel.
Replied by consultech on topic Comparison product error
Thank you Jerome for your support.
have a nice day.
Jean-Michel.
Please Log in or Create an account to join the conversation.
Time to create page: 0.143 seconds