Archive for January 2018

Where Magento keeps configuration data

SELECT * FROM magento01.core_config_data WHERE path LIKE ‘modulename%’;

Magento default settings

In config.xml <?xml version="1.0"?> <config> <default> <modulename> <parametergroup> <param>value</param> </parametergroup> </modulename> </default> </config>

Magento collection add join and filter

$tableDataCollection = Mage::getResourceModel(’modulename/tablename_collection’)->setPageSize(50);   $tableDataCollection->getSelect() ->join(array(’alias’ => Mage::getSingleton(’core/resource’)->getTableName(’modulename/tablename’)), ‘main_table.id=alias.id’, ‘*’) ->where(’alias.condition = ?’, true);

Get table name

Mage::getSingleton(’core/resource’)->getTableName(’tablename’)