Hikashop Unable to Add Product Variants

  • Posts: 7
  • Thank you received: 1
1 year 10 months ago #342480

-- HikaShop version -- : 4.6.0
-- Joomla version -- : 3.10.9
-- PHP version -- : 8.0
-- Browser(s) name and version -- : Chrome Version 77.0.3865.120 (Official Build) (32-bit)
-- Error-message(debug-mod must be tuned on) -- : The product has characteristics but not variants. Click on the 'Variants' tab and add variants to it.

Hello Nicolas,

We encountered another issue when trying to add product variants. I checked the error console and fixed the issues but wanted to bring this to your attention so you can hopefully address it and we won't have to apply this hack every time we update the software.

Javascript Errors:

hikashop.js?v=460:1467 Uncaught TypeError: this.addScript is not a function
at hikashop.js?v=460:1467
at XMLHttpRequest.xhr.onreadystatechange (hikashop.js?v=460:1504)

index.php?option=com_hikashop&ctrl=product:1 Uncaught TypeError: Cannot read property 'focus' of undefined
at HTMLInputElement.onfocus (index.php?option=com_hikashop&ctrl=product:1)'

CSS and Javascript Issues:

CSS Issue: The input field inside the 'Characteristic' field box (appears when we click on add variant button) was small in width, so when we click on the field it was not focusing properly to display the list of characteristics. So, I made the width of input fields the same width as the box by adding an inline style. I think only the javascript fix will also work, so no need to do this css fix. It seems the javascript issue was the main issues causing the trouble with the css too. So, no actual need to fix the css.

Javascript Issue: "this.addScript" function was not being called for some reason, so I changed it to "window.hikashop.addScript" and now it works.

Fixes:
- File: //administrator/components/com_hikashop/types/namebox.php #: 459-459, #: 491-492
- File: //media/com_hikashop/js/hikashop.js #: 1467, #: 1470

I hope this helps!

-JM

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
1 year 10 months ago #342484

Hi,

Thank you for your feedback. This fix is actually already on our end. We added last week as a hot fix to the 4.6.0.

The following user(s) said Thank You: motocam360

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

  • Posts: 77
  • Thank you received: 8
  • Hikashop Business
1 year 10 months ago #342621

Thanks Nicolas I can confirm the fix works.
Also I advise people to clear your browser cache after update.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.334 seconds
Powered by Kunena Forum