This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Store or website code */ | |
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; | |
/* Run store or run website */ | |
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; | |
Mage::run($mageRunCode, $mageRunType); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* @var $installer Mage_Core_Model_Resource_Setup */ | |
$installer = $this; | |
$installer->startSetup(); | |
/** | |
* Create table 'cms/block' | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* @var $installer Mage_Core_Model_Resource_Setup */ | |
$installer = $this; | |
$installer->startSetup(); | |
$installer->run(" | |
-- DROP TABLE IF EXISTS {$this->getTable('cms_block')}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<global> | |
<models> | |
<custom_module> | |
<class>Custom_Module_Model</class> | |
<resourceModel>module_resource</resourceModel> | |
</custom_module> | |
<module_resource> | |
<class>Custom_Module_Model_Resource</class> | |
<entities> | |
<custom_module> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<global> | |
<models> | |
<custom_module> | |
<class>Custom_Module_Model</class> | |
<resourceModel>module_mysql4</resourceModel> | |
</custom_module> | |
<module_mysql4> | |
<class>Custom_Module_Model_Mysql4</class> | |
<entities> | |
<custom_module> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$expression = '(field1 - field2)'; | |
$condition = $this->_getConditionSql($expression, array('eq' =>3 )); | |
$this->_select->where($condition); | |
// or.. | |
$collection->addFieldToFilter('field', array('eq' => 3)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$collection->addFieldToFilter('(field1 – field2)', array('eq' => 3)); | |
// or... | |
$collection->addFieldToFilter('`field`', array('eq' => 3)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<admin> | |
<routers> | |
<adminhtml> | |
<args> | |
<modules> | |
<custom_module after="Mage_Adminhtml">CustomModule_Adminhtml</custom_module> | |
</modules> | |
</args> | |
</adminhtml> | |
</routers> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<admin> | |
<routers> | |
<custom_module> | |
<use>admin</use> | |
<args> | |
<module>custom_module</module> | |
<frontName>custom_module</frontName> | |
</args> | |
</custom_module> | |
</routers> |