Advertisement
vitaliy76

WTV-18185

Apr 28th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.14 KB | None | 0 0
  1. diff --git a/app/code/local/TM/FireCheckout/controllers/IndexController.php b/app/code/local/TM/FireCheckout/controllers/IndexController.php
  2. index bc5ef6f..739b9e0 100644
  3. --- a/app/code/local/TM/FireCheckout/controllers/IndexController.php
  4. +++ b/app/code/local/TM/FireCheckout/controllers/IndexController.php
  5. @@ -1148,8 +1148,10 @@ public function saveCouponAction()
  6.              // (free shipping may be canceled or added)
  7.              $quote->getShippingAddress()->setCollectShippingRates(true)->collectShippingRates();
  8.  
  9. -            // Shipping methods always left in the place. Only price changes. (No max/min price rules that hides shipping methods)
  10. -            // So we don't need to apply shipping method again
  11. +            // Firecheckout has "Hide other shipping methods when free is available",
  12. +            // so we need to re-apply method
  13. +            $quote->getShippingAddress()->save(); // save is required to get updated rates
  14. +            $this->getCheckout()->applyShippingMethod();
  15.  
  16.              // if shipping price was changed, we need to recalculate totals again.
  17.              // Example: SELECTED SHIPPING METHOD NOW BECOMES FREE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement