Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Checkout_Block_Agreements
  • Mage_Checkout_Block_Cart
  • Mage_Checkout_Block_Cart_Abstract
  • Mage_Checkout_Block_Cart_Coupon
  • Mage_Checkout_Block_Cart_Crosssell
  • Mage_Checkout_Block_Cart_Item_Configure
  • Mage_Checkout_Block_Cart_Item_Renderer
  • Mage_Checkout_Block_Cart_Item_Renderer_Configurable
  • Mage_Checkout_Block_Cart_Item_Renderer_Grouped
  • Mage_Checkout_Block_Cart_Shipping
  • Mage_Checkout_Block_Cart_Sidebar
  • Mage_Checkout_Block_Cart_Totals
  • Mage_Checkout_Block_Links
  • Mage_Checkout_Block_Multishipping_Abstract
  • Mage_Checkout_Block_Multishipping_Address_Select
  • Mage_Checkout_Block_Multishipping_Addresses
  • Mage_Checkout_Block_Multishipping_Billing
  • Mage_Checkout_Block_Multishipping_Billing_Items
  • Mage_Checkout_Block_Multishipping_Link
  • Mage_Checkout_Block_Multishipping_Overview
  • Mage_Checkout_Block_Multishipping_Payment_Info
  • Mage_Checkout_Block_Multishipping_Shipping
  • Mage_Checkout_Block_Multishipping_State
  • Mage_Checkout_Block_Multishipping_Success
  • Mage_Checkout_Block_Onepage
  • Mage_Checkout_Block_Onepage_Abstract
  • Mage_Checkout_Block_Onepage_Billing
  • Mage_Checkout_Block_Onepage_Failure
  • Mage_Checkout_Block_Onepage_Link
  • Mage_Checkout_Block_Onepage_Login
  • Mage_Checkout_Block_Onepage_Payment
  • Mage_Checkout_Block_Onepage_Payment_Info
  • Mage_Checkout_Block_Onepage_Payment_Methods
  • Mage_Checkout_Block_Onepage_Progress
  • Mage_Checkout_Block_Onepage_Review
  • Mage_Checkout_Block_Onepage_Review_Info
  • Mage_Checkout_Block_Onepage_Shipping
  • Mage_Checkout_Block_Onepage_Shipping_Method
  • Mage_Checkout_Block_Onepage_Shipping_Method_Additional
  • Mage_Checkout_Block_Onepage_Shipping_Method_Available
  • Mage_Checkout_Block_Onepage_Success
  • Mage_Checkout_Block_Success
  • Mage_Checkout_Block_Total_Default
  • Mage_Checkout_Block_Total_Nominal
  • Mage_Checkout_Block_Total_Tax
  • Mage_Checkout_CartController
  • Mage_Checkout_Controller_Action
  • Mage_Checkout_Exception
  • Mage_Checkout_Helper_Cart
  • Mage_Checkout_Helper_Data
  • Mage_Checkout_Helper_Url
  • Mage_Checkout_IndexController
  • Mage_Checkout_Model_Agreement
  • Mage_Checkout_Model_Api_Resource
  • Mage_Checkout_Model_Api_Resource_Customer
  • Mage_Checkout_Model_Api_Resource_Product
  • Mage_Checkout_Model_Cart
  • Mage_Checkout_Model_Cart_Api
  • Mage_Checkout_Model_Cart_Api_V2
  • Mage_Checkout_Model_Cart_Coupon_Api
  • Mage_Checkout_Model_Cart_Coupon_Api_V2
  • Mage_Checkout_Model_Cart_Customer_Api
  • Mage_Checkout_Model_Cart_Customer_Api_V2
  • Mage_Checkout_Model_Cart_Payment_Api
  • Mage_Checkout_Model_Cart_Payment_Api_V2
  • Mage_Checkout_Model_Cart_Product_Api
  • Mage_Checkout_Model_Cart_Product_Api_V2
  • Mage_Checkout_Model_Cart_Shipping_Api
  • Mage_Checkout_Model_Cart_Shipping_Api_V2
  • Mage_Checkout_Model_Config_Source_Cart_Summary
  • Mage_Checkout_Model_Mysql4_Agreement
  • Mage_Checkout_Model_Mysql4_Agreement_Collection
  • Mage_Checkout_Model_Mysql4_Cart
  • Mage_Checkout_Model_Mysql4_Setup
  • Mage_Checkout_Model_Observer
  • Mage_Checkout_Model_Resource_Agreement
  • Mage_Checkout_Model_Resource_Agreement_Collection
  • Mage_Checkout_Model_Resource_Cart
  • Mage_Checkout_Model_Resource_Setup
  • Mage_Checkout_Model_Session
  • Mage_Checkout_Model_Type_Abstract
  • Mage_Checkout_Model_Type_Multishipping
  • Mage_Checkout_Model_Type_Multishipping_State
  • Mage_Checkout_Model_Type_Onepage
  • Mage_Checkout_Multishipping_AddressController
  • Mage_Checkout_MultishippingController
  • Mage_Checkout_OnepageController

Interfaces

  • Mage_Checkout_Model_Cart_Interface
  • Overview
  • Package
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * Magento
  4:  *
  5:  * NOTICE OF LICENSE
  6:  *
  7:  * This source file is subject to the Open Software License (OSL 3.0)
  8:  * that is bundled with this package in the file LICENSE.txt.
  9:  * It is also available through the world-wide-web at this URL:
 10:  * http://opensource.org/licenses/osl-3.0.php
 11:  * If you did not receive a copy of the license and are unable to
 12:  * obtain it through the world-wide-web, please send an email
 13:  * to license@magentocommerce.com so we can send you a copy immediately.
 14:  *
 15:  * DISCLAIMER
 16:  *
 17:  * Do not edit or add to this file if you wish to upgrade Magento to newer
 18:  * versions in the future. If you wish to customize Magento for your
 19:  * needs please refer to http://www.magentocommerce.com for more information.
 20:  *
 21:  * @category    Mage
 22:  * @package     Mage_Checkout
 23:  * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
 24:  * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
 25:  */
 26: 
 27: /**
 28:  * Multishipping checkout address matipulation controller
 29:  *
 30:  * @category   Mage
 31:  * @package    Mage_Checkout
 32:  * @author      Magento Core Team <core@magentocommerce.com>
 33:  */
 34: class Mage_Checkout_Multishipping_AddressController extends Mage_Core_Controller_Front_Action
 35: {
 36:     /**
 37:      * Retrieve multishipping checkout model
 38:      *
 39:      * @return Mage_Checkout_Model_Type_Multishipping
 40:      */
 41:     protected function _getCheckout()
 42:     {
 43:         return Mage::getSingleton('checkout/type_multishipping');
 44:     }
 45: 
 46:     /**
 47:      * Retrieve checkout state model
 48:      *
 49:      * @return Mage_Checkot_Model_Type_Multishipping_State
 50:      */
 51:     protected function _getState()
 52:     {
 53:         return Mage::getSingleton('checkout/type_multishipping_state');
 54:     }
 55: 
 56: 
 57:     /**
 58:      * Create New Shipping address Form
 59:      */
 60:     public function newShippingAction()
 61:     {
 62:         $this->_getState()->setActiveStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_SELECT_ADDRESSES);
 63:         $this->loadLayout();
 64:         $this->_initLayoutMessages('customer/session');
 65:         if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) {
 66:             $addressForm->setTitle(Mage::helper('checkout')->__('Create Shipping Address'))
 67:                 ->setSuccessUrl(Mage::getUrl('*/*/shippingSaved'))
 68:                 ->setErrorUrl(Mage::getUrl('*/*/*'));
 69: 
 70:             if ($headBlock = $this->getLayout()->getBlock('head')) {
 71:                 $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle());
 72:             }
 73: 
 74:             if ($this->_getCheckout()->getCustomerDefaultShippingAddress()) {
 75:                 $addressForm->setBackUrl(Mage::getUrl('*/multishipping/addresses'));
 76:             }
 77:             else {
 78:                 $addressForm->setBackUrl(Mage::getUrl('*/cart/'));
 79:             }
 80:         }
 81:         $this->renderLayout();
 82:     }
 83: 
 84:     public function shippingSavedAction()
 85:     {
 86:         /**
 87:          * if we create first address we need reset emd init checkout
 88:          */
 89:         if (count($this->_getCheckout()->getCustomer()->getAddresses()) == 1) {
 90:             $this->_getCheckout()->reset();
 91:         }
 92:         $this->_redirect('*/multishipping/addresses');
 93:     }
 94: 
 95:     public function editShippingAction()
 96:     {
 97:         $this->_getState()->setActiveStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_SHIPPING);
 98:         $this->loadLayout();
 99:         $this->_initLayoutMessages('customer/session');
100:         if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) {
101:             $addressForm->setTitle(Mage::helper('checkout')->__('Edit Shipping Address'))
102:                 ->setSuccessUrl(Mage::getUrl('*/*/editShippingPost', array('id'=>$this->getRequest()->getParam('id'))))
103:                 ->setErrorUrl(Mage::getUrl('*/*/*'));
104: 
105:             if ($headBlock = $this->getLayout()->getBlock('head')) {
106:                 $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle());
107:             }
108: 
109:             if ($this->_getCheckout()->getCustomerDefaultShippingAddress()) {
110:                 $addressForm->setBackUrl(Mage::getUrl('*/multishipping/shipping'));
111:             }
112:         }
113:         $this->renderLayout();
114:     }
115: 
116:     public function editShippingPostAction()
117:     {
118:         if ($addressId = $this->getRequest()->getParam('id')) {
119:             Mage::getModel('checkout/type_multishipping')
120:                 ->updateQuoteCustomerShippingAddress($addressId);
121:         }
122:         $this->_redirect('*/multishipping/shipping');
123:     }
124: 
125:     public function selectBillingAction()
126:     {
127:         $this->_getState()->setActiveStep(Mage_Checkout_Model_Type_Multishipping_State::STEP_BILLING);
128:         $this->loadLayout();
129:         $this->_initLayoutMessages('customer/session');
130:         $this->_initLayoutMessages('checkout/session');
131:         $this->renderLayout();
132:     }
133: 
134:     public function newBillingAction()
135:     {
136:         $this->loadLayout();
137:         $this->_initLayoutMessages('customer/session');
138:         if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) {
139:             $addressForm->setTitle(Mage::helper('checkout')->__('Create Billing Address'))
140:                 ->setSuccessUrl(Mage::getUrl('*/*/selectBilling'))
141:                 ->setErrorUrl(Mage::getUrl('*/*/*'))
142:                 ->setBackUrl(Mage::getUrl('*/*/selectBilling'));
143: 
144:             if ($headBlock = $this->getLayout()->getBlock('head')) {
145:                 $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle());
146:             }
147:         }
148:         $this->renderLayout();
149:     }
150: 
151:     public function editAddressAction()
152:     {
153:         $this->loadLayout();
154:         $this->_initLayoutMessages('customer/session');
155:         if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) {
156:             $addressForm->setTitle(Mage::helper('checkout')->__('Edit Address'))
157:                 ->setSuccessUrl(Mage::getUrl('*/*/selectBilling'))
158:                 ->setErrorUrl(Mage::getUrl('*/*/*', array('id'=>$this->getRequest()->getParam('id'))))
159:                 ->setBackUrl(Mage::getUrl('*/*/selectBilling'));
160: 
161:             if ($headBlock = $this->getLayout()->getBlock('head')) {
162:                 $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle());
163:             }
164:         }
165:         $this->renderLayout();
166:     }
167: 
168:     public function editBillingAction()
169:     {
170:         $this->_getState()->setActiveStep(
171:             Mage_Checkout_Model_Type_Multishipping_State::STEP_BILLING
172:         );
173:         $this->loadLayout();
174:         $this->_initLayoutMessages('customer/session');
175:         if ($addressForm = $this->getLayout()->getBlock('customer_address_edit')) {
176:             $addressForm->setTitle(Mage::helper('checkout')->__('Edit Billing Address'))
177:                 ->setSuccessUrl(Mage::getUrl('*/*/saveBilling', array('id'=>$this->getRequest()->getParam('id'))))
178:                 ->setErrorUrl(Mage::getUrl('*/*/*', array('id'=>$this->getRequest()->getParam('id'))))
179:                 ->setBackUrl(Mage::getUrl('*/multishipping/overview'));
180:             if ($headBlock = $this->getLayout()->getBlock('head')) {
181:                 $headBlock->setTitle($addressForm->getTitle() . ' - ' . $headBlock->getDefaultTitle());
182:             }
183:         }
184:         $this->renderLayout();
185:     }
186: 
187:     public function setBillingAction()
188:     {
189:         if ($addressId = $this->getRequest()->getParam('id')) {
190:             Mage::getModel('checkout/type_multishipping')
191:                 ->setQuoteCustomerBillingAddress($addressId);
192:         }
193:         $this->_redirect('*/multishipping/billing');
194:     }
195: 
196:     public function saveBillingAction()
197:     {
198:         if ($addressId = $this->getRequest()->getParam('id')) {
199:             Mage::getModel('checkout/type_multishipping')
200:                 ->setQuoteCustomerBillingAddress($addressId);
201:         }
202:         $this->_redirect('*/multishipping/overview');
203:     }
204: }
205: 
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0