Mage_Sales_Model_Quote_Address_Rate Class Reference

Inheritance diagram for Mage_Sales_Model_Quote_Address_Rate:

Mage_Shipping_Model_Rate_Abstract Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 setAddress (Mage_Sales_Model_Quote_Address $address)
 getAddress ()
 importShippingRate (Mage_Shipping_Model_Rate_Result_Abstract $rate)

Protected Member Functions

 _construct ()
 _beforeSave ()

Protected Attributes

 $_address


Detailed Description

Definition at line 28 of file Rate.php.


Member Function Documentation

_beforeSave (  )  [protected]

Processing object before save data

Returns:
Mage_Core_Model_Abstract

Reimplemented from Mage_Core_Model_Abstract.

Definition at line 37 of file Rate.php.

00038     {
00039         parent::_beforeSave();
00040         if ($this->getAddress()) {
00041             $this->setAddressId($this->getAddress()->getId());
00042         }
00043         return $this;
00044     }

_construct (  )  [protected]

Enter description here...

Reimplemented from Varien_Object.

Definition at line 32 of file Rate.php.

00033     {
00034         $this->_init('sales/quote_address_rate');
00035     }

getAddress (  ) 

Definition at line 52 of file Rate.php.

00053     {
00054         return $this->_address;
00055     }

importShippingRate ( Mage_Shipping_Model_Rate_Result_Abstract rate  ) 

Definition at line 57 of file Rate.php.

00058     {
00059         if ($rate instanceof Mage_Shipping_Model_Rate_Result_Error) {
00060             $this
00061                 ->setCode($rate->getCarrier().'_error')
00062                 ->setCarrier($rate->getCarrier())
00063                 ->setCarrierTitle($rate->getCarrierTitle())
00064                 ->setErrorMessage($rate->getErrorMessage())
00065             ;
00066         } elseif ($rate instanceof Mage_Shipping_Model_Rate_Result_Method) {
00067             $this
00068                 ->setCode($rate->getCarrier().'_'.$rate->getMethod())
00069                 ->setCarrier($rate->getCarrier())
00070                 ->setCarrierTitle($rate->getCarrierTitle())
00071                 ->setMethod($rate->getMethod())
00072                 ->setMethodTitle($rate->getMethodTitle())
00073                 ->setMethodDescription($rate->getMethodDescription())
00074                 ->setPrice($rate->getPrice())
00075             ;
00076         }
00077         return $this;
00078     }

setAddress ( Mage_Sales_Model_Quote_Address address  ) 

Definition at line 46 of file Rate.php.

00047     {
00048         $this->_address = $address;
00049         return $this;
00050     }


Member Data Documentation

$_address [protected]

Definition at line 30 of file Rate.php.


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

Generated on Sat Jul 4 17:24:49 2009 for Magento by  doxygen 1.5.8