error after using % of price for variations

  • Posts: 7
  • Thank you received: 0
5 years 9 months ago #293755

-- 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.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
5 years 9 months ago #293760

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 7
  • Thank you received: 0
5 years 9 months ago #293795

Hi Jerome,

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

bye,
kiki

Attachments:
Last edit: 5 years 9 months ago by kikidesign.

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

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
5 years 9 months ago #293800

Hi,

Thank you for your feedback.
Change the line:

} elseif(!in_array($key,array('price_currency_id','price_orig_currency_id','price_min_quantity','price_access', 'price_users'))) {
to:
} 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.

  • Posts: 7
  • Thank you received: 0
5 years 9 months ago #293883

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.

  • Posts: 81361
  • Thank you received: 13035
  • MODERATOR
5 years 9 months ago #293886

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.064 seconds
Powered by Kunena Forum