Decimal calculate product price by length

  • Posts: 64
  • Thank you received: 1
  • Hikashop Business
4 years 5 months ago #311677

Hello,

I'm calculating the price by length according to your instructions but our customers here in Greece are using the comma character "," for decimals. Instead, your plugin expects the point character "." for decimals.

How can this be fixed?

Thank you,
Yannis

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

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
4 years 5 months ago #311678

Hi,

Try changing the line:
$quantity = $quantity*$product->ordered_length;
to:
$quantity = $quantity*hikashop_toFloat($product->ordered_length);
in the file plugins/system/custom_quantity/custom_quantity.php
That should hopefully do it.
Let us know how it goes so that we can include the change on our end too for others.

The following user(s) said Thank You: yanliom

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

  • Posts: 64
  • Thank you received: 1
  • Hikashop Business
4 years 5 months ago #311707

Thank you so much.

I had to change it in two lines in the file you suggested and it seems to work fine!

The following user(s) said Thank You: nicolas

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

Time to create page: 0.073 seconds
Powered by Kunena Forum