Public Member Functions | |
__construct () | |
setWebsiteFilter ($websiteId) | |
setConditionFilter ($conditionName) | |
setCountryFilter ($countryId) | |
Protected Attributes | |
$_shipTable | |
$_countryTable | |
$_regionTable |
Definition at line 34 of file Collection.php.
__construct | ( | ) |
Reimplemented from Varien_Data_Collection.
Definition at line 40 of file Collection.php.
00041 { 00042 parent::__construct(Mage::getSingleton('core/resource')->getConnection('shipping_read')); 00043 $this->_shipTable = Mage::getSingleton('core/resource')->getTableName('shipping/tablerate'); 00044 $this->_countryTable = Mage::getSingleton('core/resource')->getTableName('directory/country'); 00045 $this->_regionTable = Mage::getSingleton('core/resource')->getTableName('directory/country_region'); 00046 $this->_select->from(array("s" => $this->_shipTable)) 00047 ->joinLeft(array("c" => $this->_countryTable), 'c.country_id = s.dest_country_id', 'iso3_code AS dest_country') 00048 ->joinLeft(array("r" => $this->_regionTable), 'r.region_id = s.dest_region_id', 'code AS dest_region') 00049 ->order(array("dest_country", "dest_region", "dest_zip")); 00050 $this->_setIdFieldName('pk'); 00051 return $this; 00052 }
setConditionFilter | ( | $ | conditionName | ) |
Definition at line 61 of file Collection.php.
00062 { 00063 $this->_select->where("condition_name = ?", $conditionName); 00064 00065 return $this; 00066 }
setCountryFilter | ( | $ | countryId | ) |
Definition at line 68 of file Collection.php.
00069 { 00070 $this->_select->where("dest_country_id = ?", $countryId); 00071 00072 return $this; 00073 }
setWebsiteFilter | ( | $ | websiteId | ) |
Definition at line 54 of file Collection.php.
00055 { 00056 $this->_select->where("website_id = ?", $websiteId); 00057 00058 return $this; 00059 }
$_countryTable [protected] |
Definition at line 37 of file Collection.php.
$_regionTable [protected] |
Definition at line 38 of file Collection.php.
$_shipTable [protected] |
Definition at line 36 of file Collection.php.