Skip to main content

Comparison product error

More
11 years 2 months ago #209908 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

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

More
11 years 2 months ago #209911 by Jerome
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
Code:
onchange="setToCompareList(<?php echo $this->row->product_id;?>,'<?php echo $this->escape($this->row->product_name); ?>',this);"
By
Code:
onchange="setToCompareList(<?php echo $this->row->product_id;?>,'<?php echo addslashes($this->escape($this->row->product_name)); ?>',this);"
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,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
11 years 2 months ago #209942 by consultech
Replied by consultech on topic Comparison product error
:) Working again.

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
Powered by Kunena Forum