console show hikashop.js errors when updating product price
4 years 7 months ago - 4 years 7 months ago #339648
by Joomill
-- HikaShop version -- : 4.5.0
-- Joomla version -- : 4.1.0
-- PHP version -- : 8.0
Hi,
I wanted to update a product price but this gives errors in the console about hikashop.js
In the end it's just not working.
Some of the things I see:
expected expression, got '<' for /media/system/js/messages.min.js85344117 hikashop.js:393:16
Have checked with a collegue, he also has seen errors.
If you can't reproduce it I can always give you access.
-- Joomla version -- : 4.1.0
-- PHP version -- : 8.0
Hi,
I wanted to update a product price but this gives errors in the console about hikashop.js
In the end it's just not working.
Some of the things I see:
expected expression, got '<' for /media/system/js/messages.min.js85344117 hikashop.js:393:16
Have checked with a collegue, he also has seen errors.
If you can't reproduce it I can always give you access.
Last edit: 4 years 7 months ago by Joomill. Reason: solved
Please Log in or Create an account to join the conversation.
4 years 7 months ago #339650
by nicolas
Replied by nicolas on topic console show hikashop.js errors when updating product price
Hi,
Thank you for the report. Joomla 4.1 changed the way the javascript files are included on the page, which creates a problem with the way HikaShop's AJAX system is working.
To fix the issue, the line:
has to be changed to:
in the file media/com_hikashop/js/hikashop.js
We've included the modification on our end so you can just redownload HikaShop 4.5.0 on our website and install it on yours to get the patch.
Thank you for the report. Joomla 4.1 changed the way the javascript files are included on the page, which creates a problem with the way HikaShop's AJAX system is working.
To fix the issue, the line:
Code:
result[1] = result[1].replace(/\.js\?[0-9a-f]{32}/gi, '.js');
Code:
result[1] = result[1].replace(/\.js\?[0-9a-f\.]{1,128}/gi, '.js');
We've included the modification on our end so you can just redownload HikaShop 4.5.0 on our website and install it on yours to get the patch.
Please Log in or Create an account to join the conversation.
4 years 7 months ago #339652
by Joomill
Replied by Joomill on topic console show hikashop.js errors when updating product price
Hi, thanks for the quick fix.
The error is gone now.
But for some reason I still cannot change the price of a variant.
When I try to do this the price is not stored and the category of this product is changed back to the default "product_category" .
I tried to enable debug system in the configuration but when I try to edit a product I get a message about "secure link failed" which is really strange. Had this in different browsers.
The error is gone now.
But for some reason I still cannot change the price of a variant.
When I try to do this the price is not stored and the category of this product is changed back to the default "product_category" .
I tried to enable debug system in the configuration but when I try to edit a product I get a message about "secure link failed" which is really strange. Had this in different browsers.
Please Log in or Create an account to join the conversation.
4 years 7 months ago #339658
by nicolas
Replied by nicolas on topic console show hikashop.js errors when updating product price
Hi,
Thanks for the feedback. This comes from the drag & drop new feature which messes the variant edit form in some cases with elements from the main product edit form.
I had to change the code:
to:
in the file administrator/components/com_hikashop/views/product/tmpl/form.php
We've included the modification on our end so you can just redownload HikaShop 4.5.0 on our website and install it on yours to get the patch.
Thanks for the feedback. This comes from the drag & drop new feature which messes the variant edit form in some cases with elements from the main product edit form.
I had to change the code:
Code:
var src = document.querySelector('div[data-id="' + elementsOrder[i]+'"]');
if(!src) {
var src = document.querySelector('.hikashop_product_edit_' + elementsOrder[i]);
Code:
var src = document.querySelector(elementsSelector+'div[data-id="' + elementsOrder[i]+'"]');
if(!src) {
var src = document.querySelector(elementsSelector+'.hikashop_product_edit_' + elementsOrder[i]);
We've included the modification on our end so you can just redownload HikaShop 4.5.0 on our website and install it on yours to get the patch.
Please Log in or Create an account to join the conversation.
4 years 7 months ago #339660
by Joomill
Replied by Joomill on topic console show hikashop.js errors when updating product price
Thanks you, this solves that issue.
The following user(s) said Thank You: nicolas
Please Log in or Create an account to join the conversation.
Time to create page: 0.231 seconds