Mage_Checkout_Block_Multishipping_Shipping Class Reference

Inheritance diagram for Mage_Checkout_Block_Multishipping_Shipping:

Mage_Sales_Block_Items_Abstract Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

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 ()


Detailed Description

Definition at line 34 of file Shipping.php.


Member Function Documentation

_prepareLayout (  )  [protected]

Preparing global layout

You can redefine this method in child classes for changin layout

Returns:
Mage_Core_Block_Abstract

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  ) 

Definition at line 84 of file Shipping.php.

00085     {
00086         return $address->getShippingMethod();
00087     }

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

Returns:
Mage_Checkout_Model_Type_Multishipping

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  ) 

Definition at line 89 of file Shipping.php.

00090     {
00091         $groups = $address->getGroupedAllShippingRates();
00092         return $groups;
00093     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:50 2009 for Magento by  doxygen 1.5.8