Public Member Functions | |
getCheckout () | |
getItems () | |
getAddressesHtmlSelect ($item, $index) | |
getAddressOptions () | |
getCustomer () | |
getItemUrl ($item) | |
getItemDeleteUrl ($item) | |
getPostActionUrl () | |
getNewAddressUrl () | |
getBackUrl () | |
isContinueDisabled () | |
Protected Member Functions | |
_prepareLayout () |
Definition at line 34 of file Addresses.php.
_prepareLayout | ( | ) | [protected] |
Preparing global layout
You can redefine this method in child classes for changin layout
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 46 of file Addresses.php.
00047 { 00048 if ($headBlock = $this->getLayout()->getBlock('head')) { 00049 $headBlock->setTitle(Mage::helper('checkout')->__('Ship to Multiple Addresses') . ' - ' . $headBlock->getDefaultTitle()); 00050 } 00051 return parent::_prepareLayout(); 00052 }
getAddressesHtmlSelect | ( | $ | item, | |
$ | index | |||
) |
Retrieve HTML for addresses dropdown
$item |
Definition at line 68 of file Addresses.php.
00069 { 00070 $select = $this->getLayout()->createBlock('core/html_select') 00071 ->setName('ship['.$index.']['.$item->getQuoteItemId().'][address]') 00072 ->setId('ship_'.$index.'_'.$item->getQuoteItemId().'_address') 00073 ->setValue($item->getCustomerAddressId()) 00074 ->setOptions($this->getAddressOptions()); 00075 00076 return $select->getHtml(); 00077 }
getAddressOptions | ( | ) |
Retrieve options for addresses dropdown
Definition at line 84 of file Addresses.php.
00085 { 00086 $options = $this->getData('address_options'); 00087 if (is_null($options)) { 00088 $options = array(); 00089 foreach ($this->getCustomer()->getAddresses() as $address) { 00090 $options[] = array( 00091 'value'=>$address->getId(), 00092 'label'=>$address->format('oneline') 00093 ); 00094 } 00095 $this->setData('address_options', $options); 00096 } 00097 return $options; 00098 }
getBackUrl | ( | ) |
getCheckout | ( | ) |
Retrieve multishipping checkout model
Definition at line 41 of file Addresses.php.
00042 { 00043 return Mage::getSingleton('checkout/type_multishipping'); 00044 }
getCustomer | ( | ) |
Definition at line 100 of file Addresses.php.
00101 { 00102 return $this->getCheckout()->getCustomerSession()->getCustomer(); 00103 }
getItemDeleteUrl | ( | $ | item | ) |
Definition at line 110 of file Addresses.php.
00111 { 00112 return $this->getUrl('*/*/removeItem', array('address'=>$item->getQuoteAddressId(), 'id'=>$item->getId())); 00113 }
getItems | ( | ) |
Definition at line 54 of file Addresses.php.
00055 { 00056 $items = $this->getCheckout()->getQuoteShippingAddressesItems(); 00057 $itemsFilter = new Varien_Filter_Object_Grid(); 00058 $itemsFilter->addFilter(new Varien_Filter_Sprintf('%d'), 'qty'); 00059 return $itemsFilter->filter($items); 00060 }
getItemUrl | ( | $ | item | ) |
Definition at line 105 of file Addresses.php.
00106 { 00107 return $this->getUrl('catalog/product/view/id/'.$item->getProductId()); 00108 }
getNewAddressUrl | ( | ) |
Definition at line 120 of file Addresses.php.
00121 { 00122 return Mage::getUrl('*/multishipping_address/newShipping'); 00123 }
getPostActionUrl | ( | ) |
Definition at line 115 of file Addresses.php.
00116 { 00117 return $this->getUrl('*/*/addressesPost'); 00118 }
isContinueDisabled | ( | ) |
Definition at line 130 of file Addresses.php.
00131 { 00132 return !$this->getCheckout()->validateMinimumAmount(); 00133 }