I keep getting the following error :
PHP Fatal error: Call to a member function setCollectShippingRates() on a non-object in /chroot/home/Client/Client.com/html/app/code/local/Company/Checkout/controllers/OnepageController.php on line 12
I don't know if its something to do with $result or setCollectShippingRates() ? Maybe Varien Data somehow? Thanks for the help.
app/code/local/Company/Checkout/controllers/OnepageController.php
require_once'app/code/local/Mage/Checkout/controllers/OnepageController.php'; class Company_Checkout_OnepageController extends Mage_Checkout_OnepageController { public function couponAction() { $this->loadLayout('checkout_onepage_review'); $this->couponCode = (string) $this->getRequest()->getParam('coupon_code'); Mage::getSingleton('checkout/cart')->getQuote()->getShippingAdress()->setCollectShippingRates(true); Mage::getSingleton('checkout/cart')->getQuote()->setCouponCode(strlen($this->couponCode) ? $this->couponCode : '')-> collectTotals()->save(); $result['goto_Section'] = 'review'; $result['update_section'] = array('name' => 'review', 'html' => $this->_getReviewHtml()); $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } }
getShippingAddressOnepageController.php?