Public Member Functions | |
getTrackingInfo ($tracking) | |
isTrackingAvailable () | |
isCityRequired () | |
isZipCodeRequired () | |
proccessAdditionalValidation (Mage_Shipping_Model_Rate_Request $request) | |
Public Attributes | |
const | USA_COUNTRY_ID = 'US' |
const | PUERTORICO_COUNTRY_ID = 'PR' |
Definition at line 32 of file Abstract.php.
getTrackingInfo | ( | $ | tracking | ) |
Definition at line 38 of file Abstract.php.
00039 { 00040 $info = array(); 00041 00042 $result = $this->getTracking($tracking); 00043 00044 if($result instanceof Mage_Shipping_Model_Tracking_Result){ 00045 if ($trackings = $result->getAllTrackings()) { 00046 return $trackings[0]; 00047 } 00048 } 00049 elseif (is_string($result) && !empty($result)) { 00050 return $result; 00051 } 00052 00053 return false; 00054 }
isCityRequired | ( | ) |
Reimplemented from Mage_Shipping_Model_Carrier_Abstract.
Definition at line 67 of file Abstract.php.
isTrackingAvailable | ( | ) |
Check if carrier has shipping tracking option available All Mage_Usa carriers have shipping tracking option available
Reimplemented from Mage_Shipping_Model_Carrier_Abstract.
Definition at line 62 of file Abstract.php.
isZipCodeRequired | ( | ) |
Reimplemented from Mage_Shipping_Model_Carrier_Abstract.
Definition at line 72 of file Abstract.php.
proccessAdditionalValidation | ( | Mage_Shipping_Model_Rate_Request $ | request | ) |
Processing additional validation to check is carrier applicable.
Mage_Shipping_Model_Rate_Request | $request |
Reimplemented from Mage_Shipping_Model_Carrier_Abstract.
Definition at line 83 of file Abstract.php.
00084 { 00085 $maxAllowedWeight = (float) $this->getConfigData('max_package_weight'); 00086 $error = null; 00087 $showMethod = $this->getConfigData('showmethod'); 00088 foreach ($request->getAllItems() as $item) { 00089 if ($item->getProduct() && $item->getProduct()->getId()) { 00090 if ($item->getProduct()->getWeight() > $maxAllowedWeight) { 00091 $error = Mage::getModel('shipping/rate_result_error'); 00092 $error->setCarrier($this->_code) 00093 ->setCarrierTitle($this->getConfigData('title')); 00094 $errorMsg = $this->getConfigData('specificerrmsg'); 00095 $error->setErrorMessage($errorMsg?$errorMsg:Mage::helper('shipping')->__('The shipping module is not available.')); 00096 break; 00097 } 00098 } 00099 } 00100 if (null !== $error && $showMethod) { 00101 return $error; 00102 } elseif (null !== $error) { 00103 return false; 00104 } 00105 return $this; 00106 }
const PUERTORICO_COUNTRY_ID = 'PR' |
Definition at line 36 of file Abstract.php.
const USA_COUNTRY_ID = 'US' |
Definition at line 35 of file Abstract.php.