subject: Magento Custom Module Development [print this page] Author: Digisha Modi Author: Digisha Modi
In todays technology era, Ecommerce is becoming a highly developed business all the time. And for running your online stores more powerfully Magento ecommerce Development can be the solution. The main aim at Magento was to develop a platform that will give the entire control in the hands of online merchants once again. With Magento eCommerce, there are bound to be no constraints on business processes and flow. Magento is the most powerful e-commerce solution around and has gained popularity in a short period of time. You can create and manage online stores using the extensive suite of powerful tools it offers. However, because of its powerful features, developing with Magento can be easier said than done. Magento is a new and powerful eCommerce system offering rich customization possibilities by extensions and modules. Magento is built on a fully modular model that influences an unlimited scalability and flexibility for your store. Part of customizing Magento is, creating Magento custom Modules. These allow you to inject functionality anywhere, whether in a "static" block fashion that's more than static, or a shipping/payment module, or large module to do something as large as integrating a 3rd party system (or multiple systems). Basically, magento module is an extension which extends the features and functionality of Magento. Some concrete examples of modules are additional payment gateway integrations, or a featured items promotional tool. With Magnetos fully object-oriented programming, all modules are immediately accessible via templates tags from any template files. And because Magento is feature-rich right out of the box, youll never again have to be dependent on a programmer to finish the simplest tasks for you. Magento also thrives on an extensive network of knowledgeable community members (including the official Magento Team), so you will never need to think twice about where to get guidance should you need it along the way. Part of customizing Magento is, of course, creating custom Modules. These allow you to inject functionality anywhere, whether in a "static" block fashion that's more than static, or a shipping/payment module, or large module to do something as large as integrating a 3rd party system (or multiple systems). Creating a magento module involve several steps. This article describes the steps that need to be followed to create a new module. 1) Create directory app/code/local/mymodulepack. Here mymodulepack will be the new directory folder where you can create modules. 2) Create module named My Module in above defined directory path. This will be your module directory which will contain required files like models, blocks, controllers etc. 3) Now add your new module xml file in app/etc/modules/mymodulepack _All.xml. Consider that _All.xml will be used to add all new module definitions to the same file instead of cluttering the etc/modules folder with many files. 4) Following defined code is used to inform Magento that there is an active module (you can turn it off from here by setting active to false). Also that it is located in the local code pool. < Mymodulepack _MyModule> true local 5) Now you can enable or disable this module at Admin -> System -> Advanced. Here you can see your new module Mymodulepack_MyModule listed there with status enable. 6) And now create the block php class file at app/code/local/Schogini/Example/Block/Myview.php which contains a function that returns the string Hello World. class Mymodulepack_MyModule_Block_Myview extends Mage_Core_Block_Template { public function myFunction(){ return Hello World!; } } ?> 7) Now make a config.xml file in app/code/local/Mymodulepack/MyModule/etc directory. This is done to enter configuration information for the module.
0.1.0 Mymodulepack_MyModule_Block
8) Now we need to create a template file which uses the View Block Class to display the message Hello World. Create a template (phtml) called myview.phtml in the following directory: appdesignfrontenddefaultdefaulttemplatemymodulemyview.phtml. 9)The module is now ready for use. You can view the output by two ways. 1) {{blocktype=mymodulepack_mymodule/viewtemplate=mymodule/myview.phtml}} 2)
At Biztech Consultancy - India based website Development Company, we offer an efficient Magento Development & Magento customization services for ecommerce website development at competitive price. Our Magento developer helps in Magento Themes development, Magento Design Integration, Magento module development, magento custom module development, Magento Custom Development, etc.About the Author:
Biztech Consultancy is a professional web development company providing website design and website development services like php development, cakephp development, SugarCRM development, Magento Development, NetOffice customization, Ecommerce Application development