Comparison product error

  • Posts: 54
  • Thank you received: 2
  • Hikaserial Subscription Hikashop Business
10 years 1 month ago #209908

-- 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.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 1 month ago #209911

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

onchange="setToCompareList(<?php echo $this->row->product_id;?>,'<?php echo $this->escape($this->row->product_name); ?>',this);"
By
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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 54
  • Thank you received: 2
  • Hikaserial Subscription Hikashop Business
10 years 1 month ago #209942

:) 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.061 seconds
Powered by Kunena Forum