tig-nl/gls-magento2

[BUG] Free shipping and various currencies

Opened this issue · 1 comments

The free shipping calculation is based on the order subtotal but this can lead to some unwanted free shipments. It doesn't matter too much if we're talking GBP/USD over a EUR base price, but it is massive on currencies like SEK (10:1!)

I've already patched it myself (see below). Basically Magento always keeps functioning with the base currency, and those fields should be used/checked.

---
 web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php b/web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php
index 14fd9ae1c6..0606ccd634 100644
--- a/web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php
+++ b/web/app/code/TIG/GLS/Model/ResourceModel/Carrier/GLS.php
@@ -223,7 +223,7 @@ class GLS extends Tablerate
     {
         $quote = $this->reloadQuote($items);
 
-        return (float) $quote->getSubtotal();
+        return (float) $quote->getBaseSubtotal();
     }
 
     /**
-- 

Hi @vandijkstef,

Thank you for bringing this to our attention, I will place this on our backlog, so we can fix this in the near future.

Have a great day,
Jeffrey