Skip to content

Instantly share code, notes, and snippets.

@erikhansen
Created December 20, 2017 00:19
Show Gist options
  • Save erikhansen/aeebf4d794aaf39b0beb50bbfaf297e9 to your computer and use it in GitHub Desktop.
Save erikhansen/aeebf4d794aaf39b0beb50bbfaf297e9 to your computer and use it in GitHub Desktop.
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