1 / 11

Magento

Magento. How to tutorial for Magento. Outline. How to setup sample data How to create new template How to create new module How to override default module controller How to do something after did something How to do cronjob How to deploy

moriah
Download Presentation

Magento

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Magento How to tutorial for Magento

  2. Outline • How to setup sample data • How to create new template • How to create new module • How to override default module controller • How to do something after did something • How to do cronjob • How to deploy • How to create new attribute/attribute set for product • How to debug

  3. Setup sample data • Sample data can be download from homepage • Must install sample first, then after that is Magento

  4. Create new template • Clone • From “app\design\frontend\base\default” • To “app\design\frontend\default\<name>” • Clone • From “skin\frontend\base\default” • To “skin\frontend\default\<name>”

  5. Create new module • http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/custom_module_with_custom_database_table • Template should be in “base/default” • Do not use __FILE__ • Use • MAGENTO_ROOT • Mage::getBaseDir($type = 'base')

  6. Override default module controller • <config> • <frontend> • <checkout> • <args> • <module_controller_path before=“checkout”>module_controller_path</module_controller_path> • </args> • </checkout> • </frontend> • </config>

  7. Do something after did something • Magento - Wiki - Customize Magento using Event/Observer • Observer class should be at Namespace_Module_Model_Observer • Some popular • Save after • Save before

  8. Do cronjob • Namespace_Model_Model_Cronjob • Magento - Wiki - How to Set Up a Cron Job • Custom built for cronjob

  9. Deploy • Clone git to a totally new folder “release-2.1.1” • Create new tag: for example “v.2.1.1” • Clone current database into new dump-database • Copy basic magento files into “release-2.1.1” • Copy local.xml from “live” to “release-2.1.1” • Change database name in local.xml from “release-2.1.1” • Test it • If success, change database name back to live • Link the “public_html” to “release-2.1.1”

  10. create new attribute/attribute set for product • New attribute must be created via code (setup_script) • Attribute must be placed in attribute set • Product attribute’s attribute meanning

  11. Debug • Enable log • Disable cached • Mage::log( $message, $level = null, $file = '', $forceLog = false) • Mage::logException($e) • Enable error view

More Related