spree_multi_currency icon indicating copy to clipboard operation
spree_multi_currency copied to clipboard

[Critical] Wrong shipment calculation during currency change

Open mbajur opened this issue 9 years ago • 2 comments

Hello i have encountered a really bad issue with spree_multi_currency picker which lets shop clients to cheat with shipping pricing.

Let's say i have two shipping methods defined:

  • DPD - 5 EUR (available just for EUR currency)
  • DPD - 10 USD (available just for USD currency)

And now, if user makes an order in EUR currency and, on checkout/shipping page, changes a currency to USD, shipment costs are 5 USD instead of 10 USD, basically shipment costs stays the same but currency changes which can produce a really bad issues and financial costs for shop owners.

mbajur avatar Jun 16 '15 10:06 mbajur

There is also another issue, probably related to this bug:

Let's say shop has two currencies defined: EUR (default) and USD. If user changes current_currency to USD and makes an order, after address step of checkout (on shipment method step) - prices are being converted to EUR but currency stays the same. So, if product costs are EUR - 5 and USD - 10, all the prices displayed on shipping step (in order summary, right colmn) are 5$ instead of 10$ (which is a mix of 5 EUR and $ dolar sign). The only way to fix that is to change currency using currency picker to EUR and then back to USD.

That's also the only way to fix that from the rails console side (2 x order.update_attribute(:currency)).

Do you guys have any idea what the hell is going on and what can i do about it? That's happening on a production site and i'm not able to fix that. Even after few hours of browsing spree/spre_multi_commerce code trying to understand how it all works.

Thanks in advance.

mbajur avatar Oct 12 '15 14:10 mbajur

I tested the Checkout screen at the Delivery stage of the process. The UPS Ground (EUR) rate was 8 EUR and the UPS Ground (USD rate was I had set at 3 USD.

When switching between EUR and USD and back, the displayed figures were all updated correctly except for two fields: 1.Shipping Method rate remained displayed as 8 USD even when switching to EUR or USD. 2. Order Total was wrong. The Item Total had 8 added to it when switching to USD.

See screenshot. Notice USD values but EUR Delivery Method screenshot_2015-11-08_02-03-49

nobicycle avatar Nov 07 '15 18:11 nobicycle