SlideShare une entreprise Scribd logo
1  sur  22
Magento (eCommerce Solution) This Presentation is about: - What is Magento? Magento Installation Introduction to Magento Directory Structure A simple module (“Hello World”) creation
What is Magento ? Magento is an open source eCommerce solution. It is based on one of the most popular PHP Designing Pattern MVC (Module, View, Controller).  It comes with a variety of tools, necessarily for building a successful online shop. Magento offers a lot of built-in capabilities, such as promo pricing and coupon codes, detailed statistics, and SEO (Search Engine Optimization) options.
Small Intro to MVC Design Pattern ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Small Intro to MVC Design Pattern Part - II How It Works ? The MVC abstraction can be graphically represented as follows.
Small Intro to MVC Design Pattern Part – II (cont..) Events typically cause a controller to change a model, or view, or both. Whenever a controller changes a model’s data or properties, all dependent views are automatically updated. Similarly, whenever a controller changes a view, for example, by revealing areas that were previously hidden, the view gets data from the underlying model to refresh itself.
Magento Installation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Magento Installation Download latest stable version (1.5.0.1) and unzip it to your web host directory Now you are ready to install the Magento. Before we proceed to installation you must have to check that you have Read and Write permission on following directories inside the magento folder. magento/app/etc magento/var magento/media Now Create a database on mysql with name “magento”. In Linux we can do so by writing the following commands (In windows you have to set path for mysql and than you can use the following command): -  mysql -u<user_name> -p<password> (enter, you get mysql prompt) mysql> create database magento;
Magento Installation If every thing is fine open your favorite web browser type into url ( http://localhost/ <your Magento folder name>/) and press enter you will see the screen link below. Click on I agree to the above terms and conditions and press “Continue”.
Magento Installation Now you get the Local Settings Screen. Here you can select your language, time zone and currency for the site. These settings is for your Site default language and currency display to user. When you done click on Continue
Magento Installation Configuration (Part – I) After setting locale setting we get the following screen for Database configuration, Web Access Options and Session Storage Options. Database Configuration : - Here we can define the name of the database we previously created in mysql and Host IP or Host Name (if DNS available) in our case Host is “localhost” and at last DB User name and Password
Magneto Installation Configuration (Part -II) Web Access Options : -  1 - Use Web Server (Apache) Rewrites You could enable this option to use web server rewrites functionality for improved search engines optimization. Please make sure that mod_rewrite is enabled in Apache configuration. 2- Use Secure URLs (SSL) Secure connection during login and purchasing process. Based on web server configuration and availability of SSL Certificate. Session Storage  :- Either you want that user login and working session is save in a DB or use your file system. We go for default (File System) When your done for Configuration press Continue to proceed Now you have to wait for installer response it will create a DB Tables. When it completed the process it will ask for Administrative Configuration.
Magento Installation Administrative Configuration You will get the screen like below: - Here you have to enter your name and email address for mail communication and the Administrator User ID and password. The last option is for Encryption Key which is used to encrypt site user passwords and for encryption of Credit Card information.
Magento Installation Administrative Configuration (Part – II) When all is done, press continue.  You will complete the installation. It will show you, your encryption key please note it down. Here you have two options : -  1 – Go to Frontend ( To view your site) 2 – Got to Backend ( For Administrative settings )
Directory Structure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Directory Structure Part – II App Directory (All Core Application files and for our created modules): - app/code (All Magento Core Files and our created modules) core Mage, Zend (PHP Framework)  local (All Modules created by us) app/design (All View Files) app/design/adminhtml app/design/frontend app/etc ( All configuration files for local modules as well as Magento modules ) app/etc/modules
New Module Creation To create a module in Magento we have a first create a directory structure as follows: - Go to folder app/code/local and create directories as follows (all directory names are case-sensitive) <directory package_name> <directory module_name> Block (files that show contents) controllers (events/controllers/functions) etc (Module configuration files) Helper (Module helper files) Model (Business logic and DB communication files) sql (DB query [Schema] files)
New Module Creation Part – II Step 1: -  Create a file inside app/etc/modules/Mymodule_All.xml Notice the _All in the xml file name. I can declare all of my modules here. (Say I have more than Example, I can also declare my Example2 module in this file). <?xml version=&quot;1.0&quot;?> <config> <modules> <Mymodule_Example> <active>true</active> <codePool>local</codePool> </Mymodule_Example> </modules> </config>
New Module Creation Part – II (Cont..) Step 2: Create file to configure your new module. Note the file locations (need to create directories as necessary). app/code/local/Mymodule/Example/etc/config.xml And write XML as follows: -  <?xml version=&quot;1.0&quot;?> <config> <modules> <Mymodule_Example> <version>0.1.0</version> </Mymodule_Example> </modules> <global> <blocks> <mymodule_example> <class>Fido_Example_Block</class> </mymodule_example> </blocks> </global> </config>
New Module Creation Part – II (Cont..) Step 3: - Now we create a block code for our module. It doesn’t really do anything, but shows some functionality. appodeocalymodulexamplelockiew.php <?php class Mymodule_Example_Block_View extends Mage_Core_Block_Template { private $message; private $att; protected function createMessage($msg) { $this->message = $msg; } public function receiveMessage() { if($this->message != '') { return $this->message; } else { $this->createMessage('Hello World'); return $this->message; } } protected function _toHtml() { $html = parent::_toHtml(); if($this->att = $this->getMyCustom() && $this->getMyCustom() != '') { $html .= '<br />'.$this->att; } else { $html .= '<br />No Custom Attribute Found'; } return $html; } }
New Module Creation Part – II (Cont..) Step 4: - Here we create our template (phtml) file. appesignrontendefaultymoduleemplatexampleiew.phtml <?php /** * Mymodule view template * * @see Mymodule_Example_Block_View * */ ?> <div> <span><strong>This is the output of the Mymodule example:</strong></span><br /> <span style=&quot;color:#FF9933;&quot;> <?php echo $this->receiveMessage(); ?> </span> </div>
New Module Creation Part – II (Cont..) Step 4: - Cont.. This just outputs some HTML and also runs the receiveMessage() function from our block (view.php). Two caveats here. By placing our view.phtml file in it’s location, we have created our own theme. You must make sure that a) Magento knows about your theme (Admin->System->Design) and b) If you use the this block in a CMS page, you set the CMS page to use your theme (Admin->CMS->Manage Pages->’Your Page’->Custom Design->Custom Theme drop down) Now our custom module is now ready for use.
New Module Creation Part – III Now open Magento Admin Panel (by using your user name and password set during installation) Now click on Admin->CMS->Pages it will show the list of all available CMS pages Now click on “Home Page”. It will open Page Information section. Now click on “Content” form left side Options and than click on button “Show Hide Editor” and then write the following : -  {{block type=&quot;mymodule_example/view&quot; template=&quot;example/view.phtml&quot; }} Now Click on save page button at top of the page. Now you should successfully have your block and the  “Hello World”  message being displayed (on your CMS page).

Contenu connexe

Tendances

IBM Connections 4.5 bidirectional synchronization
IBM Connections 4.5 bidirectional synchronizationIBM Connections 4.5 bidirectional synchronization
IBM Connections 4.5 bidirectional synchronizationmichele buccarello
 
WebClient Customization.pdf
WebClient Customization.pdfWebClient Customization.pdf
WebClient Customization.pdfsatyasekhar123
 
Enable seo friendly url in websphere portal
Enable seo friendly url in websphere portalEnable seo friendly url in websphere portal
Enable seo friendly url in websphere portalmichele buccarello
 
WordPress customizer for themes and more
WordPress customizer for themes and moreWordPress customizer for themes and more
WordPress customizer for themes and moreSantosh Kunwar
 
IBM Connections 4.5 User Data Propagation.
IBM Connections 4.5 User Data Propagation.IBM Connections 4.5 User Data Propagation.
IBM Connections 4.5 User Data Propagation.michele buccarello
 
State management in ASP.NET
State management in ASP.NETState management in ASP.NET
State management in ASP.NETOm Vikram Thapa
 
How to create a magento controller in magento extension
How to create a magento controller in magento extensionHow to create a magento controller in magento extension
How to create a magento controller in magento extensionHendy Irawan
 
How to Create A Magento Adminhtml Controller in Magento Extension
How to Create A Magento Adminhtml Controller in Magento ExtensionHow to Create A Magento Adminhtml Controller in Magento Extension
How to Create A Magento Adminhtml Controller in Magento ExtensionHendy Irawan
 
Custom theme creation websphere portal 8.5
Custom theme creation websphere portal 8.5Custom theme creation websphere portal 8.5
Custom theme creation websphere portal 8.5michele buccarello
 
Custom theme creation for Websphere Portal 8
Custom theme creation for Websphere Portal 8Custom theme creation for Websphere Portal 8
Custom theme creation for Websphere Portal 8michele buccarello
 
Maven plugin guide using Modello Framework
Maven plugin guide using Modello FrameworkMaven plugin guide using Modello Framework
Maven plugin guide using Modello Frameworkfulvio russo
 
Jinja2 Templates - San Francisco Flask Meetup
Jinja2 Templates - San Francisco Flask MeetupJinja2 Templates - San Francisco Flask Meetup
Jinja2 Templates - San Francisco Flask MeetupAlan Hamlett
 
Developing For The WordPress Customizer
Developing For The WordPress CustomizerDeveloping For The WordPress Customizer
Developing For The WordPress CustomizerAnthony Hortin
 
Parallelminds.web partdemo1
Parallelminds.web partdemo1Parallelminds.web partdemo1
Parallelminds.web partdemo1parallelminder
 
Parallelminds.web partdemo
Parallelminds.web partdemoParallelminds.web partdemo
Parallelminds.web partdemoManishaChothe
 
Whmcs addon module docs
Whmcs addon module docsWhmcs addon module docs
Whmcs addon module docsquyvn
 
Running ms sql stored procedures in mule
Running ms sql stored procedures in muleRunning ms sql stored procedures in mule
Running ms sql stored procedures in muleAnilKumar Etagowni
 

Tendances (19)

IBM Connections 4.5 bidirectional synchronization
IBM Connections 4.5 bidirectional synchronizationIBM Connections 4.5 bidirectional synchronization
IBM Connections 4.5 bidirectional synchronization
 
WebClient Customization.pdf
WebClient Customization.pdfWebClient Customization.pdf
WebClient Customization.pdf
 
Enable seo friendly url in websphere portal
Enable seo friendly url in websphere portalEnable seo friendly url in websphere portal
Enable seo friendly url in websphere portal
 
WordPress customizer for themes and more
WordPress customizer for themes and moreWordPress customizer for themes and more
WordPress customizer for themes and more
 
IBM Connections 4.5 User Data Propagation.
IBM Connections 4.5 User Data Propagation.IBM Connections 4.5 User Data Propagation.
IBM Connections 4.5 User Data Propagation.
 
State management in ASP.NET
State management in ASP.NETState management in ASP.NET
State management in ASP.NET
 
How to create a magento controller in magento extension
How to create a magento controller in magento extensionHow to create a magento controller in magento extension
How to create a magento controller in magento extension
 
How to Create A Magento Adminhtml Controller in Magento Extension
How to Create A Magento Adminhtml Controller in Magento ExtensionHow to Create A Magento Adminhtml Controller in Magento Extension
How to Create A Magento Adminhtml Controller in Magento Extension
 
Custom theme creation websphere portal 8.5
Custom theme creation websphere portal 8.5Custom theme creation websphere portal 8.5
Custom theme creation websphere portal 8.5
 
Custom theme creation for Websphere Portal 8
Custom theme creation for Websphere Portal 8Custom theme creation for Websphere Portal 8
Custom theme creation for Websphere Portal 8
 
Maven plugin guide using Modello Framework
Maven plugin guide using Modello FrameworkMaven plugin guide using Modello Framework
Maven plugin guide using Modello Framework
 
Jinja2 Templates - San Francisco Flask Meetup
Jinja2 Templates - San Francisco Flask MeetupJinja2 Templates - San Francisco Flask Meetup
Jinja2 Templates - San Francisco Flask Meetup
 
Developing For The WordPress Customizer
Developing For The WordPress CustomizerDeveloping For The WordPress Customizer
Developing For The WordPress Customizer
 
Parallelminds.web partdemo1
Parallelminds.web partdemo1Parallelminds.web partdemo1
Parallelminds.web partdemo1
 
Parallelminds.web partdemo
Parallelminds.web partdemoParallelminds.web partdemo
Parallelminds.web partdemo
 
Whmcs addon module docs
Whmcs addon module docsWhmcs addon module docs
Whmcs addon module docs
 
Mule caching strategy with redis cache
Mule caching strategy with redis cacheMule caching strategy with redis cache
Mule caching strategy with redis cache
 
PHP and Mysql
PHP and MysqlPHP and Mysql
PHP and Mysql
 
Running ms sql stored procedures in mule
Running ms sql stored procedures in muleRunning ms sql stored procedures in mule
Running ms sql stored procedures in mule
 

Similaire à Introduction to Mangento

Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development Mage Guru
 
How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0Daniele Crupi
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101Mathew Beane
 
Architecture and Analytical Study of Magento
Architecture and Analytical Study of MagentoArchitecture and Analytical Study of Magento
Architecture and Analytical Study of MagentoIRJET Journal
 
EECI - EE And Magento Integration
EECI - EE And Magento IntegrationEECI - EE And Magento Integration
EECI - EE And Magento IntegrationSimplified Safety
 
M2ModuleDevelopmenteBook
M2ModuleDevelopmenteBookM2ModuleDevelopmenteBook
M2ModuleDevelopmenteBookTrọng Huỳnh
 
Magento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentMagento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentKapil Dev Singh
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentationsasidhar
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBo-Yi Wu
 
Finding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeFinding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeBen Marks
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101Mathew Beane
 
Introduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce PlatformIntroduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce PlatformJarne W. Beutnagel
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorializdihara
 

Similaire à Introduction to Mangento (20)

Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development
 
How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0
 
Magento
MagentoMagento
Magento
 
Magento++
Magento++Magento++
Magento++
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
Synopsis
SynopsisSynopsis
Synopsis
 
Architecture and Analytical Study of Magento
Architecture and Analytical Study of MagentoArchitecture and Analytical Study of Magento
Architecture and Analytical Study of Magento
 
EECI - EE And Magento Integration
EECI - EE And Magento IntegrationEECI - EE And Magento Integration
EECI - EE And Magento Integration
 
M2ModuleDevelopmenteBook
M2ModuleDevelopmenteBookM2ModuleDevelopmenteBook
M2ModuleDevelopmenteBook
 
Magento2 Basics for Frontend Development
Magento2 Basics for Frontend DevelopmentMagento2 Basics for Frontend Development
Magento2 Basics for Frontend Development
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
 
TomatoCMS in A Nutshell
TomatoCMS in A NutshellTomatoCMS in A Nutshell
TomatoCMS in A Nutshell
 
Create Components in TomatoCMS
Create Components in TomatoCMSCreate Components in TomatoCMS
Create Components in TomatoCMS
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php framework
 
Finding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento CodeFinding Your Way: Understanding Magento Code
Finding Your Way: Understanding Magento Code
 
Joomla Day1
Joomla  Day1Joomla  Day1
Joomla Day1
 
Yoav Kutner Dutchento
Yoav Kutner DutchentoYoav Kutner Dutchento
Yoav Kutner Dutchento
 
Zendcon magento101
Zendcon magento101Zendcon magento101
Zendcon magento101
 
Introduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce PlatformIntroduction to the Magento eCommerce Platform
Introduction to the Magento eCommerce Platform
 
Struts2 tutorial
Struts2 tutorialStruts2 tutorial
Struts2 tutorial
 

Dernier

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Dernier (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Introduction to Mangento

  • 1. Magento (eCommerce Solution) This Presentation is about: - What is Magento? Magento Installation Introduction to Magento Directory Structure A simple module (“Hello World”) creation
  • 2. What is Magento ? Magento is an open source eCommerce solution. It is based on one of the most popular PHP Designing Pattern MVC (Module, View, Controller). It comes with a variety of tools, necessarily for building a successful online shop. Magento offers a lot of built-in capabilities, such as promo pricing and coupon codes, detailed statistics, and SEO (Search Engine Optimization) options.
  • 3.
  • 4. Small Intro to MVC Design Pattern Part - II How It Works ? The MVC abstraction can be graphically represented as follows.
  • 5. Small Intro to MVC Design Pattern Part – II (cont..) Events typically cause a controller to change a model, or view, or both. Whenever a controller changes a model’s data or properties, all dependent views are automatically updated. Similarly, whenever a controller changes a view, for example, by revealing areas that were previously hidden, the view gets data from the underlying model to refresh itself.
  • 6.
  • 7. Magento Installation Download latest stable version (1.5.0.1) and unzip it to your web host directory Now you are ready to install the Magento. Before we proceed to installation you must have to check that you have Read and Write permission on following directories inside the magento folder. magento/app/etc magento/var magento/media Now Create a database on mysql with name “magento”. In Linux we can do so by writing the following commands (In windows you have to set path for mysql and than you can use the following command): - mysql -u<user_name> -p<password> (enter, you get mysql prompt) mysql> create database magento;
  • 8. Magento Installation If every thing is fine open your favorite web browser type into url ( http://localhost/ <your Magento folder name>/) and press enter you will see the screen link below. Click on I agree to the above terms and conditions and press “Continue”.
  • 9. Magento Installation Now you get the Local Settings Screen. Here you can select your language, time zone and currency for the site. These settings is for your Site default language and currency display to user. When you done click on Continue
  • 10. Magento Installation Configuration (Part – I) After setting locale setting we get the following screen for Database configuration, Web Access Options and Session Storage Options. Database Configuration : - Here we can define the name of the database we previously created in mysql and Host IP or Host Name (if DNS available) in our case Host is “localhost” and at last DB User name and Password
  • 11. Magneto Installation Configuration (Part -II) Web Access Options : - 1 - Use Web Server (Apache) Rewrites You could enable this option to use web server rewrites functionality for improved search engines optimization. Please make sure that mod_rewrite is enabled in Apache configuration. 2- Use Secure URLs (SSL) Secure connection during login and purchasing process. Based on web server configuration and availability of SSL Certificate. Session Storage :- Either you want that user login and working session is save in a DB or use your file system. We go for default (File System) When your done for Configuration press Continue to proceed Now you have to wait for installer response it will create a DB Tables. When it completed the process it will ask for Administrative Configuration.
  • 12. Magento Installation Administrative Configuration You will get the screen like below: - Here you have to enter your name and email address for mail communication and the Administrator User ID and password. The last option is for Encryption Key which is used to encrypt site user passwords and for encryption of Credit Card information.
  • 13. Magento Installation Administrative Configuration (Part – II) When all is done, press continue. You will complete the installation. It will show you, your encryption key please note it down. Here you have two options : - 1 – Go to Frontend ( To view your site) 2 – Got to Backend ( For Administrative settings )
  • 14.
  • 15. Directory Structure Part – II App Directory (All Core Application files and for our created modules): - app/code (All Magento Core Files and our created modules) core Mage, Zend (PHP Framework) local (All Modules created by us) app/design (All View Files) app/design/adminhtml app/design/frontend app/etc ( All configuration files for local modules as well as Magento modules ) app/etc/modules
  • 16. New Module Creation To create a module in Magento we have a first create a directory structure as follows: - Go to folder app/code/local and create directories as follows (all directory names are case-sensitive) <directory package_name> <directory module_name> Block (files that show contents) controllers (events/controllers/functions) etc (Module configuration files) Helper (Module helper files) Model (Business logic and DB communication files) sql (DB query [Schema] files)
  • 17. New Module Creation Part – II Step 1: - Create a file inside app/etc/modules/Mymodule_All.xml Notice the _All in the xml file name. I can declare all of my modules here. (Say I have more than Example, I can also declare my Example2 module in this file). <?xml version=&quot;1.0&quot;?> <config> <modules> <Mymodule_Example> <active>true</active> <codePool>local</codePool> </Mymodule_Example> </modules> </config>
  • 18. New Module Creation Part – II (Cont..) Step 2: Create file to configure your new module. Note the file locations (need to create directories as necessary). app/code/local/Mymodule/Example/etc/config.xml And write XML as follows: - <?xml version=&quot;1.0&quot;?> <config> <modules> <Mymodule_Example> <version>0.1.0</version> </Mymodule_Example> </modules> <global> <blocks> <mymodule_example> <class>Fido_Example_Block</class> </mymodule_example> </blocks> </global> </config>
  • 19. New Module Creation Part – II (Cont..) Step 3: - Now we create a block code for our module. It doesn’t really do anything, but shows some functionality. appodeocalymodulexamplelockiew.php <?php class Mymodule_Example_Block_View extends Mage_Core_Block_Template { private $message; private $att; protected function createMessage($msg) { $this->message = $msg; } public function receiveMessage() { if($this->message != '') { return $this->message; } else { $this->createMessage('Hello World'); return $this->message; } } protected function _toHtml() { $html = parent::_toHtml(); if($this->att = $this->getMyCustom() && $this->getMyCustom() != '') { $html .= '<br />'.$this->att; } else { $html .= '<br />No Custom Attribute Found'; } return $html; } }
  • 20. New Module Creation Part – II (Cont..) Step 4: - Here we create our template (phtml) file. appesignrontendefaultymoduleemplatexampleiew.phtml <?php /** * Mymodule view template * * @see Mymodule_Example_Block_View * */ ?> <div> <span><strong>This is the output of the Mymodule example:</strong></span><br /> <span style=&quot;color:#FF9933;&quot;> <?php echo $this->receiveMessage(); ?> </span> </div>
  • 21. New Module Creation Part – II (Cont..) Step 4: - Cont.. This just outputs some HTML and also runs the receiveMessage() function from our block (view.php). Two caveats here. By placing our view.phtml file in it’s location, we have created our own theme. You must make sure that a) Magento knows about your theme (Admin->System->Design) and b) If you use the this block in a CMS page, you set the CMS page to use your theme (Admin->CMS->Manage Pages->’Your Page’->Custom Design->Custom Theme drop down) Now our custom module is now ready for use.
  • 22. New Module Creation Part – III Now open Magento Admin Panel (by using your user name and password set during installation) Now click on Admin->CMS->Pages it will show the list of all available CMS pages Now click on “Home Page”. It will open Page Information section. Now click on “Content” form left side Options and than click on button “Show Hide Editor” and then write the following : - {{block type=&quot;mymodule_example/view&quot; template=&quot;example/view.phtml&quot; }} Now Click on save page button at top of the page. Now you should successfully have your block and the “Hello World” message being displayed (on your CMS page).