Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

[BUG] Free shipping and various currencies #35

Open
vandijkstef opened this issue May 18, 2022 · 1 comment
Open

[BUG] Free shipping and various currencies #35

vandijkstef opened this issue May 18, 2022 · 1 comment

Comments

@vandijkstef
Copy link

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();
     }
 
     /**
-- 
@tig-jeffreybranderhorst

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants