Skip to main content

error after using % of price for variations

More
8 years 3 months ago #293755 by kikidesign
-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.1
-- Browser(s) name and version -- : firefox
-- Error-message(debug-mod must be tuned on) -- : Warning: A non-numeric value encountered in /www/htdocs/**********/administrator/components/com_hikashop/classes/product.php on line 3235

Hello,

If i use a % of the price of the mainproduct on a variation, i get an error:
Warning: A non-numeric value encountered in /www/htdocs/**********/administrator/components/com_hikashop/classes/product.php on line 3235
If i use as input prices, then there will be no error. But it is easier to use %. How can i solve this problem?

have a nice day!

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

More
8 years 3 months ago #293760 by Jerome
Hello,

Could you please provide more details about the value you have for your product ?

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
8 years 3 months ago - 8 years 3 months ago #293795 by kikidesign
Hi Jerome,

thank for your reply. I attach the error and the input screen. I hope it will give you enough information.

bye,
kiki
Last edit: 8 years 3 months ago by kikidesign.

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

More
8 years 3 months ago #293800 by nicolas
Hi,

Thank you for your feedback.
Change the line:
Code:
} elseif(!in_array($key,array('price_currency_id','price_orig_currency_id','price_min_quantity','price_access', 'price_users'))) {
to:
Code:
} elseif(is_numeric($value) && !in_array($key,array('price_currency_id','price_orig_currency_id','price_min_quantity','price_access', 'price_users'))) {
in the file administrator/components/com_hikashop/classes/product.php and that will remove these warnings.
We'll also add that patch on our end.
The following user(s) said Thank You: kikidesign

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

More
8 years 3 months ago #293883 by kikidesign
We installed the package but it didnt solve the problem. Changing the line in php solved it.
Thanks for the great support!
have a nice day
kiki

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

More
8 years 3 months ago #293886 by nicolas
Hi,

The patch will be in the next version so it's normal that installing the package available didn't solve the problem :)
The following user(s) said Thank You: kikidesign

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

Time to create page: 0.200 seconds
Powered by Kunena Forum