Enviar búsqueda
Cargar
How to create a magento controller in magento extension
•
4 recomendaciones
•
14,853 vistas
Hendy Irawan
Seguir
Tecnología
Noticias y política
Denunciar
Compartir
Denunciar
Compartir
1 de 22
Descargar ahora
Descargar para leer sin conexión
Recomendados
How to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension Tutorial
Hendy Irawan
MFTF-Webkul Magento Meetup 2018
MFTF-Webkul Magento Meetup 2018
RatneshKumar143
Jinja2 Templates - San Francisco Flask Meetup
Jinja2 Templates - San Francisco Flask Meetup
Alan Hamlett
Empowering users: modifying the admin experience
Empowering users: modifying the admin experience
Beth Soderberg
Mason - A Template system for us Perl programmers
Mason - A Template system for us Perl programmers
Jerome Eteve
7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!
Bartłomiej Krztuk
WordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus Smarter
Jonny Allbut
JoomlaEXPO Presentation by Joe LeBlanc
JoomlaEXPO Presentation by Joe LeBlanc
John Coonen
Recomendados
How to Develop a Basic Magento Extension Tutorial
How to Develop a Basic Magento Extension Tutorial
Hendy Irawan
MFTF-Webkul Magento Meetup 2018
MFTF-Webkul Magento Meetup 2018
RatneshKumar143
Jinja2 Templates - San Francisco Flask Meetup
Jinja2 Templates - San Francisco Flask Meetup
Alan Hamlett
Empowering users: modifying the admin experience
Empowering users: modifying the admin experience
Beth Soderberg
Mason - A Template system for us Perl programmers
Mason - A Template system for us Perl programmers
Jerome Eteve
7 reasons why developers should love Joomla!
7 reasons why developers should love Joomla!
Bartłomiej Krztuk
WordCamp Manchester 2016 - Making WordPress Menus Smarter
WordCamp Manchester 2016 - Making WordPress Menus Smarter
Jonny Allbut
JoomlaEXPO Presentation by Joe LeBlanc
JoomlaEXPO Presentation by Joe LeBlanc
John Coonen
Joomlapresentation
Joomlapresentation
jlleblanc
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
Ivan Chepurnyi
DRUPAL Menu System
DRUPAL Menu System
Amit Kumar Singh
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
Chad Windnagle
Drupal 7 — Circle theme
Drupal 7 — Circle theme
Kirill Borzov
Routing in Drupal 8
Routing in Drupal 8
kgoel1
Angular js filters and directives
Angular js filters and directives
Darryl Sherman
Curso Symfony - Clase 3
Curso Symfony - Clase 3
Javier Eguiluz
2.routing in zend framework 3
2.routing in zend framework 3
Razvan Raducanu, PhD
Slimme Joomla! Templating Tips en Truuks
Slimme Joomla! Templating Tips en Truuks
ThemePartner
날로 먹는 Django admin 활용
날로 먹는 Django admin 활용
KyeongMook "Kay" Cha
WordPress as a Content Management System
WordPress as a Content Management System
Valent Mustamin
Editing the Visual Editor (WordPress)
Editing the Visual Editor (WordPress)
Jake Goldman
Joomla Day UK 2009 Menus Presentation
Joomla Day UK 2009 Menus Presentation
Chris Davenport
World's Youngest Web Desigener
World's Youngest Web Desigener
MianAsadAli
Top Wordpress dashboard hacks
Top Wordpress dashboard hacks
Pankaj Subedi
Alfredo-PUMEX
Alfredo-PUMEX
tutorialsruby
How to Create A Magento Adminhtml Controller in Magento Extension
How to Create A Magento Adminhtml Controller in Magento Extension
Hendy Irawan
Magento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kc
Suman KC
Ves Beat – magento 2 templates
Ves Beat – magento 2 templates
Bùi Quỳnh
Magento 2 UI Components Overview
Magento 2 UI Components Overview
eGlobe IT Solutions
Front End Development in Magento
Front End Development in Magento
Eric Landmann
Más contenido relacionado
La actualidad más candente
Joomlapresentation
Joomlapresentation
jlleblanc
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
Ivan Chepurnyi
DRUPAL Menu System
DRUPAL Menu System
Amit Kumar Singh
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
Chad Windnagle
Drupal 7 — Circle theme
Drupal 7 — Circle theme
Kirill Borzov
Routing in Drupal 8
Routing in Drupal 8
kgoel1
Angular js filters and directives
Angular js filters and directives
Darryl Sherman
Curso Symfony - Clase 3
Curso Symfony - Clase 3
Javier Eguiluz
2.routing in zend framework 3
2.routing in zend framework 3
Razvan Raducanu, PhD
Slimme Joomla! Templating Tips en Truuks
Slimme Joomla! Templating Tips en Truuks
ThemePartner
날로 먹는 Django admin 활용
날로 먹는 Django admin 활용
KyeongMook "Kay" Cha
WordPress as a Content Management System
WordPress as a Content Management System
Valent Mustamin
Editing the Visual Editor (WordPress)
Editing the Visual Editor (WordPress)
Jake Goldman
Joomla Day UK 2009 Menus Presentation
Joomla Day UK 2009 Menus Presentation
Chris Davenport
World's Youngest Web Desigener
World's Youngest Web Desigener
MianAsadAli
Top Wordpress dashboard hacks
Top Wordpress dashboard hacks
Pankaj Subedi
Alfredo-PUMEX
Alfredo-PUMEX
tutorialsruby
La actualidad más candente
(17)
Joomlapresentation
Joomlapresentation
Magento 2.0: Prepare yourself for a new way of module development
Magento 2.0: Prepare yourself for a new way of module development
DRUPAL Menu System
DRUPAL Menu System
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
Drupal 7 — Circle theme
Drupal 7 — Circle theme
Routing in Drupal 8
Routing in Drupal 8
Angular js filters and directives
Angular js filters and directives
Curso Symfony - Clase 3
Curso Symfony - Clase 3
2.routing in zend framework 3
2.routing in zend framework 3
Slimme Joomla! Templating Tips en Truuks
Slimme Joomla! Templating Tips en Truuks
날로 먹는 Django admin 활용
날로 먹는 Django admin 활용
WordPress as a Content Management System
WordPress as a Content Management System
Editing the Visual Editor (WordPress)
Editing the Visual Editor (WordPress)
Joomla Day UK 2009 Menus Presentation
Joomla Day UK 2009 Menus Presentation
World's Youngest Web Desigener
World's Youngest Web Desigener
Top Wordpress dashboard hacks
Top Wordpress dashboard hacks
Alfredo-PUMEX
Alfredo-PUMEX
Destacado
How to Create A Magento Adminhtml Controller in Magento Extension
How to Create A Magento Adminhtml Controller in Magento Extension
Hendy Irawan
Magento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kc
Suman KC
Ves Beat – magento 2 templates
Ves Beat – magento 2 templates
Bùi Quỳnh
Magento 2 UI Components Overview
Magento 2 UI Components Overview
eGlobe IT Solutions
Front End Development in Magento
Front End Development in Magento
Eric Landmann
Magento Presentation Layer
Magento Presentation Layer
Volodymyr Kublytskyi
How to create theme in Magento 2 - Part 2
How to create theme in Magento 2 - Part 2
Magestore
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
Mathew Beane
How To Create Theme in Magento 2 - Part 1
How To Create Theme in Magento 2 - Part 1
Magestore
Destacado
(9)
How to Create A Magento Adminhtml Controller in Magento Extension
How to Create A Magento Adminhtml Controller in Magento Extension
Magento 2 theming - knowledge sharing session by suman kc
Magento 2 theming - knowledge sharing session by suman kc
Ves Beat – magento 2 templates
Ves Beat – magento 2 templates
Magento 2 UI Components Overview
Magento 2 UI Components Overview
Front End Development in Magento
Front End Development in Magento
Magento Presentation Layer
Magento Presentation Layer
How to create theme in Magento 2 - Part 2
How to create theme in Magento 2 - Part 2
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
How To Create Theme in Magento 2 - Part 1
How To Create Theme in Magento 2 - Part 1
Similar a How to create a magento controller in magento extension
Magento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request Flow
Vrann Tulika
Clean Javascript
Clean Javascript
Ryunosuke SATO
Magento Performance Toolkit
Magento Performance Toolkit
Sergii Shymko
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8
Michelangelo van Dam
Using and reusing CakePHP plugins
Using and reusing CakePHP plugins
Pierre MARTIN
Magento++
Magento++
Alessandro Nadalin
Struts Overview
Struts Overview
elliando dias
CGI::Prototype (NPW 2006)
CGI::Prototype (NPW 2006)
brian d foy
Curso Symfony - Clase 4
Curso Symfony - Clase 4
Javier Eguiluz
We sport architecture_implementation
We sport architecture_implementation
aurelianaur
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
pootsbook
ReactJS
ReactJS
Kamlesh Singh
The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010
Fabien Potencier
Phing101 or How to staff a build orchestra
Phing101 or How to staff a build orchestra
raphaelstolt
Introduction to backbone presentation
Introduction to backbone presentation
Brian Hogg
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgets
velveeta_512
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
iMasters
Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)
Fabio Biondi
Symfony2 - from the trenches
Symfony2 - from the trenches
Lukas Smith
Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2
Christoffer Noring
Similar a How to create a magento controller in magento extension
(20)
Magento Live Australia 2016: Request Flow
Magento Live Australia 2016: Request Flow
Clean Javascript
Clean Javascript
Magento Performance Toolkit
Magento Performance Toolkit
Unit testing after Zend Framework 1.8
Unit testing after Zend Framework 1.8
Using and reusing CakePHP plugins
Using and reusing CakePHP plugins
Magento++
Magento++
Struts Overview
Struts Overview
CGI::Prototype (NPW 2006)
CGI::Prototype (NPW 2006)
Curso Symfony - Clase 4
Curso Symfony - Clase 4
We sport architecture_implementation
We sport architecture_implementation
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
ReactJS
ReactJS
The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010
Phing101 or How to staff a build orchestra
Phing101 or How to staff a build orchestra
Introduction to backbone presentation
Introduction to backbone presentation
Getting the Most Out of jQuery Widgets
Getting the Most Out of jQuery Widgets
Building com Phing - 7Masters PHP
Building com Phing - 7Masters PHP
Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)
Symfony2 - from the trenches
Symfony2 - from the trenches
Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2
Más de Hendy Irawan
Apa yang dapat Anda raih dengan Besut Kode Universitas
Apa yang dapat Anda raih dengan Besut Kode Universitas
Hendy Irawan
Persiapan Google Summer of Code (GSoC)
Persiapan Google Summer of Code (GSoC)
Hendy Irawan
Tutorial JSON-LD dan RabbitMQ di Java
Tutorial JSON-LD dan RabbitMQ di Java
Hendy Irawan
EBA Internship Program 2015-2016
EBA Internship Program 2015-2016
Hendy Irawan
Big Data innovation in Japan’s energy industry - EBA Fieldwork 2015
Big Data innovation in Japan’s energy industry - EBA Fieldwork 2015
Hendy Irawan
EBA (Evidence-Based Approach) Culture
EBA (Evidence-Based Approach) Culture
Hendy Irawan
Peraturan Walikota (Perwal) PPDB Kota Bandung Tahun 2015
Peraturan Walikota (Perwal) PPDB Kota Bandung Tahun 2015
Hendy Irawan
Sosialisasi Petunjuk Teknis Penerimaan Peserta Didik Baru (PPDB) Kota Bandung...
Sosialisasi Petunjuk Teknis Penerimaan Peserta Didik Baru (PPDB) Kota Bandung...
Hendy Irawan
Twitter Author Prediction from Tweets using Bayesian Network
Twitter Author Prediction from Tweets using Bayesian Network
Hendy Irawan
Biased Media - Game Theory (EL5000) Course Project
Biased Media - Game Theory (EL5000) Course Project
Hendy Irawan
3D Reality Tracking in Realtime - Team Hendy-Sigit
3D Reality Tracking in Realtime - Team Hendy-Sigit
Hendy Irawan
Pemrograman Logika Induktif (Inductive Logic Programming)
Pemrograman Logika Induktif (Inductive Logic Programming)
Hendy Irawan
Inductive Logic Programming
Inductive Logic Programming
Hendy Irawan
AksiMata Studio Tablet
AksiMata Studio Tablet
Hendy Irawan
AksiMata Studio for Lenovo® AIO
AksiMata Studio for Lenovo® AIO
Hendy Irawan
AksiMata Studio
AksiMata Studio
Hendy Irawan
Dasar Koperasi Kredit (Credit Union)
Dasar Koperasi Kredit (Credit Union)
Hendy Irawan
Search Engine Marketing (SEM)
Search Engine Marketing (SEM)
Hendy Irawan
Más de Hendy Irawan
(18)
Apa yang dapat Anda raih dengan Besut Kode Universitas
Apa yang dapat Anda raih dengan Besut Kode Universitas
Persiapan Google Summer of Code (GSoC)
Persiapan Google Summer of Code (GSoC)
Tutorial JSON-LD dan RabbitMQ di Java
Tutorial JSON-LD dan RabbitMQ di Java
EBA Internship Program 2015-2016
EBA Internship Program 2015-2016
Big Data innovation in Japan’s energy industry - EBA Fieldwork 2015
Big Data innovation in Japan’s energy industry - EBA Fieldwork 2015
EBA (Evidence-Based Approach) Culture
EBA (Evidence-Based Approach) Culture
Peraturan Walikota (Perwal) PPDB Kota Bandung Tahun 2015
Peraturan Walikota (Perwal) PPDB Kota Bandung Tahun 2015
Sosialisasi Petunjuk Teknis Penerimaan Peserta Didik Baru (PPDB) Kota Bandung...
Sosialisasi Petunjuk Teknis Penerimaan Peserta Didik Baru (PPDB) Kota Bandung...
Twitter Author Prediction from Tweets using Bayesian Network
Twitter Author Prediction from Tweets using Bayesian Network
Biased Media - Game Theory (EL5000) Course Project
Biased Media - Game Theory (EL5000) Course Project
3D Reality Tracking in Realtime - Team Hendy-Sigit
3D Reality Tracking in Realtime - Team Hendy-Sigit
Pemrograman Logika Induktif (Inductive Logic Programming)
Pemrograman Logika Induktif (Inductive Logic Programming)
Inductive Logic Programming
Inductive Logic Programming
AksiMata Studio Tablet
AksiMata Studio Tablet
AksiMata Studio for Lenovo® AIO
AksiMata Studio for Lenovo® AIO
AksiMata Studio
AksiMata Studio
Dasar Koperasi Kredit (Credit Union)
Dasar Koperasi Kredit (Credit Union)
Search Engine Marketing (SEM)
Search Engine Marketing (SEM)
Último
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Pixlogix Infotech
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Stephanie Beckett
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Precisely
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
Slibray Presentation
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
DianaGray10
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
hariprasad279825
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Zilliz
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
ScyllaDB
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
NavinnSomaal
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
Fwdays
Último
(20)
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
How to create a magento controller in magento extension
1.
How to Create
A Controller in Magento Extension Bippo Commerce Creating your own pages in Magento.
2.
URL Structure http://demo.bippo.co.id/module/controller/action
3.
Create Module's etc/config.xml <?xml
version="1.0" encoding="UTF-8"?> <config> <modules> <Bippo_MyBanner > <version>1.0.0</version> </Bippo_MyBanner > </modules> </config>
4.
Activate in etc/modules/
{company}_{module}.xml <?xml version="1.0" encoding="UTF-8"?> <config> <modules> <Bippo_MyBanner > <active>true</active> <codePool>community</codePool> </Bippo_MyBanner > </modules> </config>
5.
Controller Class PHP
Code class Bippo_MyBanner_Display Controller extends Mage_Core_Controller_Front_Action { public function showAction(){ } } Bippo/MyBanner/controllers/DisplayController.php
6.
Router Config ... <frontend>
<routers> <mybanner> <use>standard</use> <args> <module>Bippo_MyBanner</module> <frontName>display</frontName> </args> </mybanner> </routers> </frontend> ... Bippo/MyBanner/etc/config.xml
7.
"Raw" Action
8.
Test public function helloAction(){ echo "Hello World"; }
9.
Test it
http://localhost/magento/mybanner/display/hello
10.
Layout-based Action
11.
Layout Config <frontend>
<layout> <updates> <mybanner> <file>mybanner.xml</file> </mybanner> </updates> </layout> </frontend> Bippo/MyBanner/etc/config.xml
12.
Layout XML <?xml version="1.0"
encoding="UTF-8"?> <layout version="0.1.0"> <arithmetic_integer_multiply> <reference name="root"> <action method="setTemplate"> <template>page/1column.phtml</template> </action> </reference> <reference name="content"> <block type="core/template" name="arithmetic_integer_multiply" template="arithmetic/integer/multiply.phtml"></block> </reference> </arithmetic_integer_multiply> </layout> bippomybanner.xml
13.
Load Layout in
Action public function smallAction(){ $this->loadLayout(); $this->renderLayout(); }
14.
Test
/mybanner/display/small
15.
Get URL from
PHP <?php echo Mage::getUrl('mybanner/display/small') ? >
16.
Process Input <form action="<?php
echo Mage::getUrl('arithmetic/integer/multiply') ?>" method="post"> <fieldset> <ul> <li> <label for="int1">Integer 1</label> <input type="text" id="int1" name="int1" /> </li> <li> <label for="int2">Integer 2</label> <input type="text" id="int2" name="int2" /> </li> <li><input type="submit" value="Multiply" /></li> </ul> </fieldset> </form>
17.
Is Form POST
? $this>getRequest()>isPost()
18.
Process POST Parameters public
function multiplyAction(){ if ($this->getRequest()->isPost()){ $int1 = $this->getRequest()->getPost('int1'); $int2 = $this->getRequest()->getPost('int2'); $result = $int1 * $int2; Mage::getSingleton('customer/session') ->addSuccess("$int1 * $int2 = $result"); } $this->loadLayout(); $this->_initLayoutMessages('customer/session'); $this->renderLayout(); }
19.
Support Messages Block $this>_initLayoutMessages('customer/session'); Other choices:
adminhtml/session catalog/session checkout/session
20.
Add Message Mage::getSingleton('customer/session')
>addSuccess("$int1 * $int2 = $result");
21.
Display Message in
PHTML Template echo $this>getMessagesBlock()>getGroupedHtml();
22.
References
http://blog.baobaz.com/en/blog/magentomodulecreateyourowncontroller
Descargar ahora