Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save real34/e041f92d732a9d7edd0b to your computer and use it in GitHub Desktop.
Save real34/e041f92d732a9d7edd0b to your computer and use it in GitHub Desktop.
Fixed shipping method not saved in 1.7.0.2
commit 60943790900417c1a56c01b235b098eecbc66045
Author: Pierre Martin <[email protected]>
Date: Tue May 5 14:19:24 2015 +0200
Fixed delivery choice in one page checkout
diff --git a/app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php b/app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php
index 73a66dd..47c1683 100644
--- a/app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php
+++ b/app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php
@@ -441,7 +441,9 @@ class Chronopost_Chronorelais_Checkout_OnepageController extends Mage_Checkout_O
*/
if(!$result) {
Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method', array('request'=>$this->getRequest(), 'quote'=>$this->getOnepage()->getQuote()));
- // $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
+ $this->getOnepage()->getQuote()->collectTotals();
+
+ // $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
$result['goto_section'] = 'payment';
$result['update_section'] = array(
@@ -449,6 +451,7 @@ class Chronopost_Chronorelais_Checkout_OnepageController extends Mage_Checkout_O
'html' => $this->_getPaymentMethodsHtml()
);
}
+ $this->getOnepage()->getQuote()->collectTotals()->save();
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment