samnabi / shopkit

Comprehensive commerce solution for Kirby CMS v2
https://shopkit.samnabi.com
Other
99 stars 15 forks source link

Rounded shipping rate #219

Closed guidoferreyra closed 5 years ago

guidoferreyra commented 5 years ago

I cant remember if I already reported this issue, sorry If I’m reposting.

When an order with a custom shipping rule is added to the cart and after the language of the site is changed the shipping price its rounded because its saved with a different decimal point on the order file.

In my case I solved this issue modifying the cart controller in the line 125.

// Old
'shipping-additional' => $shippingmethods_additional_amount,
// New
'shipping-additional' => number_format($shippingmethods_additional_amount ,decimalPlaces($site->currency_code()),'.',''),

Let me know if this is correct. Best.