This file contains 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
<!-- file config.xml --> | |
<config> | |
<modules> | |
<Namespace_Module> | |
<version>0.1.0</version> | |
</Namespace_Module> | |
</modules> | |
<frontend> | |
<routers> | |
<tag> <!-- tag can be for example : catalog,checkout,etc --> |
This file contains 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
<!-- local/Namespace/Module/etc/config.xml --> | |
<config> | |
<global> | |
<page> | |
<layouts> | |
<template_name translate="label" module="Namespace_Module"><!-- Example template_name : homepage --> | |
<label>Template_Label</label><!-- Example : Homepage --> | |
<template>path/template.phtml</template> | |
<layout_handle>handle_name</layout_handle> <!-- Example : namespace_homepage --> | |
</template_name> |
This file contains 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
<!-- local/Namespace/module/etc/config.xml --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<config> | |
<global> | |
<blocks> | |
<namespace_module> | |
<class>Namespace_Module_Block</class> | |
</namespace_module> | |
</blocks> | |
<models> |
This file contains 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
<!-- local/Namespace/Module/data/namespace_module_setup/data-install.0.0.1.php --> | |
<?php | |
/** | |
* CMS Blocks Installer | |
*/ | |
try { | |
$block1Content = <<<HTML | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. |
This file contains 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
<!-- local/Namespace/Catalog/data/Namespace_catalog_setup/data-install-0.0.1.php --> | |
<?php | |
try { | |
/* @var $installer Mage_Catalog_Model_Resource_Setup */ | |
$installer = $this; | |
/** | |
* Custom attribute creation |
This file contains 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
<!-- local/Namespace/MyModule/Helper/Data.php --> | |
<?php | |
class Namespace_Module_Helper_Data extends Mage_core_Helper_Abstract { | |
public function isActivated | |
{ | |
return Mage::getStoreConfig('namespace_module/active_picture'); | |
} | |
This file contains 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
/** Build your Js **/ | |
alert(Translator.translate('My Text to translate')); | |
alert(Translator.translate('Another Text to translate')); |
This file contains 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 | |
class Namespace_Catalog_Helper_Data extends Mage_core_Helper_Abstract { | |
const BLOCK_TYPE = "namespace_catalog/product_list_item"; | |
const TEMPLATE = "catalog/product/list/item.phtml"; | |
/** | |
* Get product list item HTML | |
* |
This file contains 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 | |
/** Create a block adminhtml **/ | |
class Namespace_Module_Block_Adminhtml_System_Config_Editor extends Mage_Adminhtml_Block_System_Config_Form_Field implements Varien_Data_Form_Element_Renderer_Interface | |
{ | |
/** | |
* Allowed Wysiwyg | |
* @return string | |
*/ | |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) |
This file contains 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 | |
/** Location : Namespace/module/data/namespace_module_setup/install-0.1.0.php | |
try { | |
$storeId = 4 // your target store; | |
/** | |
* Set the right Store | |
*/ | |
Mage::app()->setCurrentStore($storeId); | |
$_helperCategory = Mage::helper('catalog/category'); |
OlderNewer