Decimal calculate product price by length

  • Posts: 18
  • Thank you received: 1
  • Hikashop Business
2 weeks 5 days 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: 67199
  • Thank you received: 9963
  • MODERATOR
2 weeks 5 days 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: 18
  • Thank you received: 1
  • Hikashop Business
2 weeks 4 days 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.055 seconds
Powered by Kunena Forum