- Posts: 64
- Thank you received: 6
Error with weight array key
- Jokingmind
-
Topic Author
- Offline
Less
More
3 years 11 months ago #345241
by Jokingmind
Error with weight array key was created by Jokingmind
-- HikaShop version -- : 4.6.2
-- Joomla version -- : 4.2.3
-- PHP version -- : 8.0
-- Error-message(debug-mod must be tuned on) -- : Warning: Undefined array key "gr" in L:\laragon\www\zoe4\administrator\components\com_hikashop\helpers\weight.php on line 42
Hello everyone,
I am migrating from version 3.10 to 4.2.3.
When I go to the checkout page an error is thrown:
Warning: Array key "gr" undefined in L:\laragon\www\zoe4\administrator\components\com_hikashop\helpers\weight.php at line 42
I had added the unit 'gr' in the configuration/advanced/weight symbols page, but the system replies that 'The weight unit "gr" is not in the list of possible units: mg,g,dag,kg,t,lb,oz,ozt,l,ml,cl'.
Has anything changed? This value comes from Joomla version 3.9, and I had no problems there.
Thank you
Davide
-- Joomla version -- : 4.2.3
-- PHP version -- : 8.0
-- Error-message(debug-mod must be tuned on) -- : Warning: Undefined array key "gr" in L:\laragon\www\zoe4\administrator\components\com_hikashop\helpers\weight.php on line 42
Hello everyone,
I am migrating from version 3.10 to 4.2.3.
When I go to the checkout page an error is thrown:
Warning: Array key "gr" undefined in L:\laragon\www\zoe4\administrator\components\com_hikashop\helpers\weight.php at line 42
I had added the unit 'gr' in the configuration/advanced/weight symbols page, but the system replies that 'The weight unit "gr" is not in the list of possible units: mg,g,dag,kg,t,lb,oz,ozt,l,ml,cl'.
Has anything changed? This value comes from Joomla version 3.9, and I had no problems there.
Thank you
Davide
Please Log in or Create an account to join the conversation.
3 years 11 months ago #345243
by nicolas
Replied by nicolas on topic Error with weight array key
Hi,
No, that message "The weight unit "gr" is not in the list of possible units: mg,g,dag,kg,t,lb,oz,ozt,l,ml,cl" was always there. You cannot provide a weight unit different than the ones in there.
If you want to use grams but you want to display gr instead of g, what you can do is to use g and then add a translation override like this:
G="gr"
www.hikashop.com/download/languages.html#modify
No, that message "The weight unit "gr" is not in the list of possible units: mg,g,dag,kg,t,lb,oz,ozt,l,ml,cl" was always there. You cannot provide a weight unit different than the ones in there.
If you want to use grams but you want to display gr instead of g, what you can do is to use g and then add a translation override like this:
G="gr"
www.hikashop.com/download/languages.html#modify
Please Log in or Create an account to join the conversation.
- Jokingmind
-
Topic Author
- Offline
Less
More
- Posts: 64
- Thank you received: 6
3 years 11 months ago #345286
by Jokingmind
Replied by Jokingmind on topic Error with weight array key
Hi
that's really funny cause the message has only now appeared. The same site, before the update to J4, did not show any error; I was able to select 'gr" from the dropdown menu in the product page (admin) and there were no error about that unit in the checkout process.
Anyway, I've created a mass action and changed all the values to the defalut 'g' unit.
Thank you for the reply!
Davide
that's really funny cause the message has only now appeared. The same site, before the update to J4, did not show any error; I was able to select 'gr" from the dropdown menu in the product page (admin) and there were no error about that unit in the checkout process.
Anyway, I've created a mass action and changed all the values to the defalut 'g' unit.
Thank you for the reply!
Davide
Please Log in or Create an account to join the conversation.
Time to create page: 0.173 seconds