Public Member Functions | |
getCheckout () | |
getAddresses () | |
getAddressCount () | |
getAddressItems ($address) | |
getAddressShippingMethod ($address) | |
getShippingRates ($address) | |
getCarrierName ($carrierCode) | |
getAddressEditUrl ($address) | |
getItemsEditUrl () | |
getPostActionUrl () | |
getBackUrl () | |
getShippingPrice ($address, $price, $flag) | |
Protected Member Functions | |
_prepareLayout () |
Definition at line 34 of file Shipping.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 Shipping.php.
00047 { 00048 if ($headBlock = $this->getLayout()->getBlock('head')) { 00049 $headBlock->setTitle(Mage::helper('checkout')->__('Shipping Methods') . ' - ' . $headBlock->getDefaultTitle()); 00050 } 00051 return parent::_prepareLayout(); 00052 }
getAddressCount | ( | ) |
Definition at line 59 of file Shipping.php.
00060 { 00061 $count = $this->getData('address_count'); 00062 if (is_null($count)) { 00063 $count = count($this->getAddresses()); 00064 $this->setData('address_count', $count); 00065 } 00066 return $count; 00067 }
getAddressEditUrl | ( | $ | address | ) |
Definition at line 103 of file Shipping.php.
00104 { 00105 return $this->getUrl('*/multishipping_address/editShipping', array('id'=>$address->getCustomerAddressId())); 00106 }
getAddresses | ( | ) |
Definition at line 54 of file Shipping.php.
00055 { 00056 return $this->getCheckout()->getQuote()->getAllShippingAddresses(); 00057 }
getAddressItems | ( | $ | address | ) |
Definition at line 69 of file Shipping.php.
00070 { 00071 $items = array(); 00072 foreach ($address->getAllItems() as $item) { 00073 if ($item->getParentItemId()) { 00074 continue; 00075 } 00076 $item->setQuoteItem($this->getCheckout()->getQuote()->getItemById($item->getQuoteItemId())); 00077 $items[] = $item; 00078 } 00079 $itemsFilter = new Varien_Filter_Object_Grid(); 00080 $itemsFilter->addFilter(new Varien_Filter_Sprintf('%d'), 'qty'); 00081 return $itemsFilter->filter($items); 00082 }
getAddressShippingMethod | ( | $ | address | ) |
getBackUrl | ( | ) |
Definition at line 118 of file Shipping.php.
00119 { 00120 return $this->getUrl('*/*/backtoaddresses'); 00121 }
getCarrierName | ( | $ | carrierCode | ) |
Definition at line 95 of file Shipping.php.
00096 { 00097 if ($name = Mage::getStoreConfig('carriers/'.$carrierCode.'/title')) { 00098 return $name; 00099 } 00100 return $carrierCode; 00101 }
getCheckout | ( | ) |
Get multishipping checkout model
Definition at line 41 of file Shipping.php.
00042 { 00043 return Mage::getSingleton('checkout/type_multishipping'); 00044 }
getItemsEditUrl | ( | ) |
Definition at line 108 of file Shipping.php.
00109 { 00110 return $this->getUrl('*/*/backToAddresses'); 00111 }
getPostActionUrl | ( | ) |
Definition at line 113 of file Shipping.php.
00114 { 00115 return $this->getUrl('*/*/shippingPost'); 00116 }
getShippingPrice | ( | $ | address, | |
$ | price, | |||
$ | flag | |||
) |
Definition at line 123 of file Shipping.php.
00124 { 00125 return $address->getQuote()->getStore()->convertPrice($this->helper('tax')->getShippingPrice($price, $flag, $address), true); 00126 }
getShippingRates | ( | $ | address | ) |