Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <?php
  2. $this->reCalculateTotals();
  3. ?>
  4.  
  5. public function reCalculateTotals() {
  6. $this->getQuote()->collectTotals(true)->save();
  7. return $this->getQuote()->getShippingAddress()->getShippingMethod();
  8. }
  9.  
  10. /**
  11. * Collect totals
  12. *
  13. * @param bool $force Should we ignore getTotalsCollectedFlag
  14. *
  15. * @return Mage_Sales_Model_Quote
  16. */
  17. public function collectTotals($force = false)
  18.  
  19. /**
  20. * Protect double totals collection
  21. */
  22. if (!$force && $this->getTotalsCollectedFlag()) {
  23. return $this;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement