Magento Starters Guide

Published on April 2017 | Categories: Documents | Downloads: 64 | Comments: 0 | Views: 224
of 27
Download PDF   Embed   Report

Comments

Content

Magento Starter’s guide
An introduction to your new e-commerce platform

Content
•  •  •  •  1.- Who is Blue Jay Projects 2.- What should we know about Magento? 3.- Learn the product 4.- Developer’s Area
•  •  •  •  •  •  4.1.- What you should learn before… 4.2.- My First day with Magento 4.3.- Modifying Magento 4.4.- Keeping a maintainable Magento 4.5.- Magento Ninja 4.6.- Performance tips

•  5.- References and links

Blue Jay Projects
•  Main focus in LAMP Performance and Scalability, Distributed DBMS •  E-commerce, Magento , Cloud-computing architectures •  Agile Evangelists

Customers and Experiences

* Copyright of the logos belong to their respectives companies

Get to know the product!

WHAT SHOULD WE KNOW ABOUT MAGENTO?

Unique Selling Points
•  Modularity , inherited from Zend Framework software architecture •  Data Flexibility, however EAV has a cost •  Community driven software, great ecosystem with lots of modules •  Multi currency, Multi store, Multi language, designed to see your business grow •  Very fast release cycle

History
•  Magento first release 1.0 : March 31st, 2008 •  Latest community release 1.6.1.0 : October 31st, 2011 •  First versions hardly relied on Entity-Attribute-Model, with all the current flexibility but with big performance issues, just like any other beta software. •  Later releases got rid of EAV model in order entity and offered the possibility to flatten the catalog entities ( products / categories ). •  Many people still wait for customer entity to be flattened at some point, which would also boost big Magento installations.

Versions
Community -  Open Source OSL v3 -  No official support, however you may find lots of companies offering it -  No Warranty or any kind of indemnification Professional Enterprise -  PA-DSS Compliant -  Professional + More -  Supported by advanced modules Magento solution enterprise oriented, partners official support with -  Warranty included SLA. -  Indemnification included -  To sum up: Magento community with some minor modules, and everything it takes to be PCICompliant

Find more at Magentocommerce.com

Release History
Release 1.3.0 1.3.1 1.4.0.0 1.4.0.1 1.4.1.0 1.4.1.1 1.5.0.0 1.5.0.1 1.6.0.0 1.6.1.0 What’s special? WSDL, Flat catalog, Bugfix Widgets, WYSIWYG editor, 3dSecure bugfix Flatten Orders! Bugfix and LOTS of FEATURES! Better Order statuses management, magento mobile, better import/export, All from 1.5.0.0 + bugfix Minimum advertised price, persistent cart, some shipping integration to print labels Minor improvements and bugfix Date 2009/03/30 2009/04/17 (18 days) 2010/02/12 2010/02/19 2010/07/10 2010/06/26 Failed! 2011/02/09 2011/08/18 2011/10/19

OK, we like it. Where should we Start?

* Bob Spunge copyright is property of Viacom International

Learn the product
•  Have some training in e-commerce in general, you’ll find most of the things you might need are either in Magento core modules or Magento connect. •  Magento has a lot of information to watch and read. Pay attention to the webinars at http://www.magentocommerce.com/media/webinars/, get special focus on Magento U summer webinars, they were quite good. This is pretty important to avoid developing “new” features, instead of using what comes out-of-the-box. •  Visit http://www.magentocommerce.com/magento-connect/ , have a look at some modules out there, probably you find 80% of what you want for your business. You might also get some new ideas… •  Spend lots of time playing with Magento backend, get to know what’s in every single tab, each link…

Seriously, Spend enough time to understand what we’ve seen so far. It will save you lots of headaches!!

* Image extracted from docmendizabal.blogspot.com

Ready!

DEVELOPER’S AREA

What you should learn before…
•  Magento is a Zend Framework (v1) application. Learning ZF will help you getting Magento quickly. Dedicate some days to learn at http://framework.zend.com/ •  Understand OOP http://en.wikipedia.org/wiki/Object-oriented_programming first . Once you are done, study and understand Eventdriven programming http://en.wikipedia.org/wiki/Event-driven_programming •  Understand Model View Controller architectural pattern principles ( http://en.wikipedia.org/wiki/Model–view–controller ), and RESPECT it when developing Magento.

Seriously, Spend enough time to understand what we’ve seen so far. It will save you lots of headaches!!

* Image extracted from docmendizabal.blogspot.com

I know kung-fu. Prove it!
* The Matrix is a registered brand by Warner Bros.

Everything is hard at the beginning…

MY FIRST DAY DEVELOPING MAGENTO
*picture from blackberrypool.com

•  You might need some help during setup, follow the official installation guide at
http://www.magentocommerce.com/knowledge-base/entry/magento-installation-guide

•  After the installation, you MUST understand EVERY SINGLE parameter under “system>configuration”. It’s the key to avoid developing again something that comes out-of-the-box. •  Magento directory structure: •  “app” directory is your main focus •  “js” and “skin” will also be important developing frontend •  “media” will host all the catalog pictures •  “var” is where all the temporary content will be •  Don’t mess too much with the rest…

•  Create your own Namespace in “app/code/local” . Every module you develop will be placed there. •  Create also your own design package in “app/design/ frontend” . Remember the webinars…
http://www.magentocommerce.com/media/screencasts/designers-guide-1/view

•  Create new layouts and use them in any CMS page
http://www.magentocommerce.com/design_guide/articles/intro-to-layouts

•  Change view files and see how your changes are applied. Remember flushing the cache if enabled!

•  Create your first module: •  Start by using the “Magento module creator”.
http://www.magentocommerce.com/magento-connect/modulecreator.html

•  This will create a basic skeleton of a module for you. Play with it! •  Important: •  Model: create your own and instantiate it from anywhere •  Controller: create your actions and do some tests •  Helper: instantiate it and see what you can do, not only playing with i18n •  Sql upgrade scripts: you are able to interact with the DB as your module gets upgraded. •  Blocks: see what you can do, and test the cache capabilities

Modifying Magento
•  Now it’s time to override Magento core elements •  Overriding a model:
http://www.magentocommerce.com/boards/viewthread/16829/

•  Overriding a controller , 2 examples, depending on what you want to do exactly:
•  Override the whole controller:
http://web-magician.blogspot.com/2009/06/overriding-controllers-and-actions-in.html

•  Override an action:
http://www.spinonesolutions.com/2010/03/magento-controller-override/

•  Overriding a block
http://www.magentocommerce.com/boards/viewthread/14692/

•  Overriding a helper:
http://magedev.com/2009/06/03/magento-overriding-model-block-or-helper/

Keeping a Maintainable Magento
•  Use Magento’s ORM, don’t launch SQL queries to the DB. (it might make sense under some circunstantes, but less than you might think) •  Avoid extending core classes, work with Magento events and observers instead.
•  Learn how to create an observer: http://bit.ly/dby1mw •  Discover all the existing events in Magento, there’s an event for everything!
http://www.magentocommerce.com/wiki/development/reference/event-list?do=diff

•  Your code will be easily installable in any other Magento setup, installing other’s modules will also be easier, and any upgrade won’t be that painful.

Magento Ninja! (1/2)
•  If you already work as an Event-driven developer, and want to get deeper, try…:
•  Creating cronjobs:
http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job

•  Using Magento cache. Remember to use tags, and what tags are affecting your cached object.
http://www.nicksays.co.uk/2010/07/developers-guide-magento-cache/

•  Creating configuration settings:
http://alanstorm.com/custom_magento_system_configuration

•  Creating attributes programatically if you need them in your modules
http://stackoverflow.com/questions/3459424/how-to-add-an-attribute-programmatically

Magento Ninja! (2/2)
• Creating new payment method: http://bit.ly/ckekRU • Creating new shipping method: http://bit.ly/d59xR8 • Using Magento transactions: http://bit.ly/tuCBZg • Creating Magento widgets: http://bit.ly/m22By

Performance tips
•  Enable Magento code compilation: Make sure not to include files from others, and to develop healthy magento code. http://alanstorm.com/magento_compiler_path •  Boost up user’s experience by enabling JS/CSS merge. This will also not work if you include missing files in your layout XML… •  If you work with Community Edition, use any Full Page Cache system: Either you create your own or purchase anyone on the market.

Performance tips
•  Profile your site continuously: •  Xhprof: https://github.com/preinheimer/xhprof •  Zend Server: http://www.zend.com/products/server/ •  Lucierna Antorcha: http://www.lucierna.com/ •  Use CDN’s and/or reverse proxies for as much content as you can. •  Find more about performance and scalability at http://slidesha.re/rwZ7hZ

References & Links
•  http://www.magentocommerce.com/knowledge-base •  http://magento4u.wordpress.com/ ( maybe this site has been closed? ) •  http://alanstorm.com/ •  http://magetool.co.uk/ •  https://github.com/alistairstead •  Fernando Palomo's Slideshare Presentation

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close