Mage_Shipping_Model_Mysql4_Carrier_Tablerate_Collection Class Reference

Inheritance diagram for Mage_Shipping_Model_Mysql4_Carrier_Tablerate_Collection:

Varien_Data_Collection_Db Varien_Data_Collection

List of all members.

Public Member Functions

 __construct ()
 setWebsiteFilter ($websiteId)
 setConditionFilter ($conditionName)
 setCountryFilter ($countryId)

Protected Attributes

 $_shipTable
 $_countryTable
 $_regionTable


Detailed Description

Definition at line 34 of file Collection.php.


Constructor & Destructor Documentation

__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     }


Member Function Documentation

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     }


Member Data Documentation

$_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.


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

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