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 |
Definition at line 28 of file Rate.php.
_beforeSave | ( | ) | [protected] |
Processing object before save data
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 | ( | ) |
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 | ) |