error when adding variants

  • Posts: 202
  • Thank you received: 13
3 years 1 month ago #338654

-- HikaShop version -- : 4.4.5
-- Joomla version -- : 4.0.5
-- PHP version -- : 7.4

After saving the product with variants, when I come back to the product and want to add more variants options, I got js errors in my console and system doesnt show the variants anymore

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

  • Posts: 202
  • Thank you received: 13
3 years 1 month ago #338656

I've explained the problem in this zip file in 1 minute

Attachments:

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
3 years 1 month ago #338663

Hi,

This is the same error as reported here:
www.hikashop.com/forum/product-category-...op-on-j4/337892.html
It has been fixed with HikaShop 4.4.5
I can see in your video that you're using the 4.4.4 so updating should fix the problem.

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

  • Posts: 202
  • Thank you received: 13
3 years 1 month ago #338684

Thank you

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

  • Posts: 202
  • Thank you received: 13
3 years 1 month ago #338749

Would you please tell me which file should be replaced to fix this specific problem ?
because I've made core changes so I can not update to 4.4.5 now

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
3 years 1 month ago #338757

Hi,

If you read what is written in the link I gave, the solution was given here:
www.hikashop.com/support/forum/product-c...de-mes-produits.html
In English:
You need to change the code:

if (xmlhttp.status == 200)
						eval(xmlhttp.responseText);
to:
if (xmlhttp.status == 200) {
					try {
						eval(xmlhttp.responseText);
					} catch (e) {
						if (e instanceof SyntaxError) {
							console.log(e.message + ' for ' + src);
						}
					}
				}
in the file media/com_hikashop/js/hikashop.js

The following user(s) said Thank You: khashiz

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

  • Posts: 202
  • Thank you received: 13
3 years 1 month ago #338772

becuase it was a code change offered by someone one else than you, i was hesitating to change the file or not ...

now I did it and problem solved , thank you

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
3 years 1 month ago #338788

I was the one who wrote the message 3 months ago though: www.hikashop.com/support/forum/product-c...produits.html#336314
Anyways, I'm glad the problem is solved for you.

The following user(s) said Thank You: khashiz

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

Time to create page: 0.066 seconds
Powered by Kunena Forum