[Skip to main content](#vessel-content)

#   Hikashop Unable to Add Product Variants

##

- **[motocam360](/forum/user/52032-motocam360 "View motocam360's Profile")**
- [![motocam360's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/52032-motocam360 "View motocam360's Profile") Topic Author
- [ Offline](/forum/user/52032-motocam360)

Less More

- Posts: 7
- Thank you received: 1
-
-

4 years 5 months ago [\#342480](#342480) by [motocam360](/forum/user/52032-motocam360 "View motocam360's Profile")  *[Hikashop Unable to Add Product Variants](/forum/26-product-category-display/904580-hikashop-unable-to-add-product-variants#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&#95;hikashop&amp;ctrl=product:1 Uncaught TypeError: Cannot read property 'focus' of undefined at HTMLInputElement.onfocus (index.php?option=com&#95;hikashop&amp;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: &quot;this.addScript&quot; function was not being called for some reason, so I changed it to &quot;window.hikashop.addScript&quot; and now it works.  Fixes: - File: //administrator/components/com&#95;hikashop/types/namebox.php #: 459-459, #: 491-492 - File: //media/com&#95;hikashop/js/hikashop.js #: 1467, #: 1470  I hope this helps!  -JM")* was created by *[motocam360](/forum/user/52032-motocam360 "View motocam360's Profile")*

-- 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&amp;ctrl=product:1 Uncaught TypeError: Cannot read property 'focus' of undefined
at HTMLInputElement.onfocus (index.php?option=com_hikashop&amp;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQ1ODAtaGlrYXNob3AtdW5hYmxlLXRvLWFkZC1wcm9kdWN0LXZhcmlhbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

4 years 5 months ago [\#342484](#342484) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hikashop Unable to Add Product Variants](/forum/26-product-category-display/904580-hikashop-unable-to-add-product-variants#342484 "-- 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&#95;hikashop&amp;ctrl=product:1 Uncaught TypeError: Cannot read property 'focus' of undefined at HTMLInputElement.onfocus (index.php?option=com&#95;hikashop&amp;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: &quot;this.addScript&quot; function was not being called for some reason, so I changed it to &quot;window.hikashop.addScript&quot; and now it works.  Fixes: - File: //administrator/components/com&#95;hikashop/types/namebox.php #: 459-459, #: 491-492 - File: //media/com&#95;hikashop/js/hikashop.js #: 1467, #: 1470  I hope this helps!  -JM")*

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](/forum/user/52032-motocam360 "View motocam360's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQ1ODAtaGlrYXNob3AtdW5hYmxlLXRvLWFkZC1wcm9kdWN0LXZhcmlhbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[huwhuw](/forum/user/35272-huwhuw "View huwhuw's Profile")**
- [![huwhuw's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar35272.jpg)](/forum/user/35272-huwhuw "View huwhuw's Profile")
- [ Offline](/forum/user/35272-huwhuw)

Less More

- Posts: 84
- Thank you received: 9
-
-

4 years 5 months ago [\#342621](#342621) by [huwhuw](/forum/user/35272-huwhuw "View huwhuw's Profile")  Replied by *[huwhuw](/forum/user/35272-huwhuw "View huwhuw's Profile")* on topic *[Hikashop Unable to Add Product Variants](/forum/26-product-category-display/904580-hikashop-unable-to-add-product-variants#342621 "-- 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&#95;hikashop&amp;ctrl=product:1 Uncaught TypeError: Cannot read property 'focus' of undefined at HTMLInputElement.onfocus (index.php?option=com&#95;hikashop&amp;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: &quot;this.addScript&quot; function was not being called for some reason, so I changed it to &quot;window.hikashop.addScript&quot; and now it works.  Fixes: - File: //administrator/components/com&#95;hikashop/types/namebox.php #: 459-459, #: 491-492 - File: //media/com&#95;hikashop/js/hikashop.js #: 1467, #: 1470  I hope this helps!  -JM")*

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](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDQ1ODAtaGlrYXNob3AtdW5hYmxlLXRvLWFkZC1wcm9kdWN0LXZhcmlhbnRzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.082 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
