Created
December 20, 2017 00:19
-
-
Save erikhansen/aeebf4d794aaf39b0beb50bbfaf297e9 to your computer and use it in GitHub Desktop.
Fix free shipping logic in Magento 2.1.10 - See https://github.com/magento/magento2/issues/12573#issuecomment-352926916
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: Model/SalesRule/Calculator.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- Model/SalesRule/Calculator.php (date 1513354238000) | |
+++ Model/SalesRule/Calculator.php (date 1513354238000) | |
@@ -45,6 +45,17 @@ | |
break; | |
case Rule::FREE_SHIPPING_ADDRESS: | |
+ // Begin edit | |
+ /** | |
+ * SMC-490_192 - Fix a bug where the "Free Shipping" payment method never shows up | |
+ * | |
+ * This is how it's *supposed* to work (2.1.6): http://take.ms/b8hfy | |
+ * Reproduced this issue in a 2.1.9 EE and 2.1.10 EE install with sample data: http://take.ms/CwfKS | |
+ * | |
+ * Adding this one line works around the issue | |
+ */ | |
+ $item->setFreeShipping($rule->getDiscountQty() ? $rule->getDiscountQty() : true); | |
+ // End edit | |
$address->setFreeShipping(true); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment