- Posts: 127
- Thank you received: 6
Issue with selecting variant characteristic
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.3.16
-- Browser(s) name and version -- : Chrome 81.0.4044.92
-- Error-message(debug-mod must be tuned on) -- : Uncaught ReferenceError: hikashopUpdateVariant is not defined
at HTMLSelectElement.onchange (index.php?option=com_hikashop&ctrl=product&task=edit&cid[]=198:1)
at Object.trigger (jquery.min.js?4df11245de4898e60d61002f63eff38c:2)
at Object.a.event.trigger (jquery-migrate.min.js?4df11245de4898e60d61002f63eff38c:2)
at HTMLSelectElement. (jquery.min.js?4df11245de4898e60d61002f63eff38c:2)
at Function.each (jquery.min.js?4df11245de4898e60d61002f63eff38c:2)
at a.fn.init.each (jquery.min.js?4df11245de4898e60d61002f63eff38c:2)
at a.fn.init.trigger (jquery.min.js?4df11245de4898e60d61002f63eff38c:2)
at Chosen.result_select (chosen.jquery.min.js?4df11245de4898e60d61002f63eff38c:1)
at Chosen.search_results_mouseup (chosen.jquery.min.js?4df11245de4898e60d61002f63eff38c:1)
at HTMLUListElement. (chosen.jquery.min.js?4df11245de4898e60d61002f63eff38c:1)
onchange @ index.php?option=com_hikashop&ctrl=product&task=edit&cid[]=198:1
trigger @ jquery.min.js?4df11245de4898e60d61002f63eff38c:2
a.event.trigger @ jquery-migrate.min.js?4df11245de4898e60d61002f63eff38c:2
(anonymous) @ jquery.min.js?4df11245de4898e60d61002f63eff38c:2
each @ jquery.min.js?4df11245de4898e60d61002f63eff38c:2
each @ jquery.min.js?4df11245de4898e60d61002f63eff38c:2
trigger @ jquery.min.js?4df11245de4898e60d61002f63eff38c:2
Chosen.result_select @ chosen.jquery.min.js?4df11245de4898e60d61002f63eff38c:1
Chosen.search_results_mouseup @ chosen.jquery.min.js?4df11245de4898e60d61002f63eff38c:1
(anonymous) @ chosen.jquery.min.js?4df11245de4898e60d61002f63eff38c:1
dispatch @ jquery.min.js?4df11245de4898e60d61002f63eff38c:2
v.handle @ jquery.min.js?4df11245de4898e60d61002f63eff38c:2
Hello Hikashop Team
Hope you are all well and safe. Sorry, but I have a little problem with Variant updating...
When I try to select an alternative characteristic from the existing characteristic options I get a script error, and the characteristic is not changed.
For instance, when I want to change a Colour from the existing colour, "Bracken" to become another created colour "Bracken (waiting for stock)", the change is not saved and the browser reports "Uncaught ReferenceError: hikashopUpdateVariant is not defined..."
This seems to be happening since a recent update to the latest version of Hikashop.
Any help appreciated.
Kind regards, Bob
Please Log in or Create an account to join the conversation.
Please download again the install package of the latest version of HikaShop on our website and install it on yours.
It will add a patch which should fix that.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
We use the Attach Invoice Plugin, and since the update when I try to download the Invoice I receive an error message:
<<
And the invoice is not downloaded.
Where should I look to solve this?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I don't think this is linked to the update.
This error means that somewhere in the invoice you have a br tag not written properly.
It's hard to say where though.
What I would recommend is to add the code:
That way, you'll get to see the HTML of the invoice before the PDF is generated out of it. Then, you can search for that br tag in the HTML of the invoice in order to better understand where the problem is coming from.
It could be the store address, it could be the name of a product, the address of the customer, the address format, etc.
Please Log in or Create an account to join the conversation.
I think I've found it... some code I was trying, to add a custom product field to invoice.php in ../attachinvoice/attachinvoice
So, easy to fix the <br/>. Just a little stuck on how to add a custom product field (in our case 'nmpartnumber'). Any tips?
I've tried echo $product->order_product_nmpartnumber;
And a number of other methods, with no success.
Please Log in or Create an account to join the conversation.
The custom product field data is not loaded in the invoice.
You could do like that:
Please Log in or Create an account to join the conversation.
I made only one tiny change, if it helps others:
Please Log in or Create an account to join the conversation.
Can I use a similar method to access a custom field of type Item?
Each of our bicycles have a Frame number, which we want to record on each invoice, as well as in the item field, "itmframenumber"
If it helps, this is my first naive attempt in the file attachinvoice/invoice.php
There is data in the itmframenumber field which shows on the back-end order details.
Please Log in or Create an account to join the conversation.
The custom item field data is directly avaliable in $product.
So you can just do:
echo $product->itmframenumber;
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.