Mage_Checkout_Block_Onepage_Shipping_Method_Available Class Reference

Inheritance diagram for Mage_Checkout_Block_Onepage_Shipping_Method_Available:

Mage_Checkout_Block_Onepage_Abstract Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 getShippingRates ()
 getAddress ()
 getCarrierName ($carrierCode)
 getAddressShippingMethod ()
 getShippingPrice ($price, $flag)

Protected Attributes

 $_rates
 $_address


Detailed Description

Definition at line 35 of file Available.php.


Member Function Documentation

getAddress (  ) 

Definition at line 64 of file Available.php.

00065     {
00066         if (empty($this->_address)) {
00067             $this->_address = $this->getQuote()->getShippingAddress();
00068         }
00069         return $this->_address;
00070     }

getAddressShippingMethod (  ) 

Definition at line 80 of file Available.php.

00081     {
00082         return $this->getAddress()->getShippingMethod();
00083     }

getCarrierName ( carrierCode  ) 

Definition at line 72 of file Available.php.

00073     {
00074         if ($name = Mage::getStoreConfig('carriers/'.$carrierCode.'/title')) {
00075             return $name;
00076         }
00077         return $carrierCode;
00078     }

getShippingPrice ( price,
flag 
)

Definition at line 85 of file Available.php.

00086     {
00087         return $this->getQuote()->getStore()->convertPrice(Mage::helper('tax')->getShippingPrice($price, $flag, $this->getAddress()), true);
00088     }

getShippingRates (  ) 

Definition at line 40 of file Available.php.

00041     {
00042 
00043         if (empty($this->_rates)) {
00044             $this->getAddress()->collectShippingRates()->save();
00045 
00046             $groups = $this->getAddress()->getGroupedAllShippingRates();
00047             /*
00048             if (!empty($groups)) {
00049                 $ratesFilter = new Varien_Filter_Object_Grid();
00050                 $ratesFilter->addFilter(Mage::app()->getStore()->getPriceFilter(), 'price');
00051 
00052                 foreach ($groups as $code => $groupItems) {
00053                     $groups[$code] = $ratesFilter->filter($groupItems);
00054                 }
00055             }
00056             */
00057 
00058             return $this->_rates = $groups;
00059         }
00060 
00061         return $this->_rates;
00062     }


Member Data Documentation

$_address [protected]

Definition at line 38 of file Available.php.

$_rates [protected]

Definition at line 37 of file Available.php.


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

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