30

I have been a PHP developer for 13+ years, have extensive knowledge of PHP itself as long as some other popular projects like WordPress. I have no experience with Magento.

I now have a full time job working for a company that uses Magento, all my development work will be on Magento pretty much now.

My initial thoughts after looking at Magento for the first time are, wow what have I got myself into now? But then the experienced developer in me comes out and remembers, it's just PHP.

So I have some basic Magento questions I would really appreciate some answers to from more experienced Magento Developers...

  1. What is the best most useful places to learn about magento development beside this site?
  2. Extensions/plugins are very confusing so far to me. Other platforms like WordPress allow you to place a plugin into it's own folder and all it's files will live under that folder. From what I have seen so far, a plugin might be scattered accross several folders in Magento, is this correct?
  3. I have learned about how to over-ride Core functionality. So if a file in the core is located here /app/code/core/Mage/SitemapModel/Resource/Catalog then I can over-ride it by creating the file in this location /app/code/local/Mage/SitemapModel/Resource/Catalog so how does this work with an Extension/plugin? If I create a plugin that need to over-ride core functionality, then I must have my files all over the place for that extension to work?
  4. Any other info you wish you knew starting out with magento?

Thanks for any insight, I know this is a multi part question but I feel any of the answers would be helpful to myself and other starting out, I will make this public wiki if I must as well.

2
  • 1
    If there were such a thing as a sticky on stackexchange then this Q&A would be one! What a resource this has turned into :)
    – McNab
    Commented Jun 28, 2013 at 21:56
  • @McNab There is not a Sticky feature, however question that have the most vote generally rank higher and get seen more often. Also this page magento.stackexchange.com/?tab=month is showing this question as number 2 right now so that is sort of a Sticky but it says "Month" so I am not sure how long it will retain it's stickiness. I agree that has turned into a great resource and I have it favortied and bokmarked for easy access in the future. BTW please share this community with your friends so that is it sure to become a permanent home and not die after Beta period
    – JasonDavis
    Commented Jun 30, 2013 at 0:08

5 Answers 5

24

I'm going to focus on the first part of your question - "how do I learn / where do I get started?"

As a former Zend Framework developer, the biggest help to me in developing Magento has been the explosion in online learning that Magento U has brought in the past 2 years. Aside from the formal learning - I learn mostly by doing, and I have been "doing" Magento for over 5 years now.

Some concrete learning resources:

Aside from learning tools, for me the largest learning tool has been by examining 3rd party Magento modules. I read the code throughly and learn from it. You can do the same by learning from the Core modules.

Some sites that will be helpful to you on your learning journey:

http://magento-quickies.tumblr.com/

http://alanstorm.com/

http://colin.mollenhour.com/

http://magentotherightway.com/

Some epic developers to follow:

Alistair Stead: https://github.com/alistairstead

Fabrizio Branca: https://github.com/fbrnc/

Vinai Kopp: https://github.com/Vinai

Get involved socially - meet some of the 'rockstar' developers and start to follow them on Twitter. Reach out to specific people when you need help; this community is amazingly approachable. Use the community to your advantage.

Some Twitter lists:

https://twitter.com/inchoo/magento

https://twitter.com/kkoepke/magento

https://twitter.com/eHubSystem/magento-imagine-2013

https://twitter.com/GingerWarriorX/magento-peeps

Finally - make the trek next year to Magento Imagine next year and press the flesh. Track us down, ask us questions. Get out to your local meetups. If a meetup doesn't exist in your area - start one. Be persistent. Don't let your lack of knowledge keep you from networking and meeting people. Your relationships in the community will pay off in dividends.

0
14

My 2 cents to brilliant @philwinkle's answer.

There are two official PDFs

1) Magento Extension Developer’s Guide

80 pages on how-to create a custom extension from scratch step-by-step. Module "News" is developed from scratch - it will show you module’s files and folders’ structure, config files, controllers, models, blocks.

2) Designer's Guide to Magento can be found here http://www.magentocommerce.com/resources/magento-user-guide

60 pages on how-to organize and create your own themes, packages according to best practices.

There is also a new book specifically for those who have PHP background and start with Magento - Magento PHP Developer’s Guide by Allan McGregor and it has very good reviews from Magento developers on Amazon and various blogs

Video channels: Magento Commerce YouTube channel

Meet Magento conferences videos

Other good blogs:

http://magebase.com/
http://inchoo.net/blog/
http://www.kingletas.com/
http://blog.belvg.com/category/magento-news/developer-certification http://fbrnc.net/tag:Magento
http://www.demacmedia.com/category/magento-commerce/

1
  • 1
    This is great - awesome resources!
    – philwinkle
    Commented Jun 13, 2013 at 11:21
8

Great answers here so far all around. Regarding

Extensions/plugins are very confusing so far to me. Other platforms like WordPress allow you to place a plugin into it's own folder and all it's files will live under that folder. From what I have seen so far, a plugin might be scattered across several folders in Magento, is this correct?

The terminology in Magento gets a little confusing. The platform's early development was ruthlessly rapid and there's many times where you'll see overlapping concepts from false starts and changes in direction. Extensions/plugins/modules/I'm-a-developer-and-want-to-add-my-code-to-the-system is one of these areas.

A Magento Connect Extension is simply a package of files that may be installed into a Magento system. It's completely decoupled from any of Magento's other programatic sub-systems.

Closer to what you're used to though are Magento Code Modules. Roughly speaking, a code module is a collection of PHP files that Magento sees as single unit. Modules are located in one of three folders

app/code/core
app/code/community
app/code/local

When you want to customize Magento, or add new features, you'll almost always start with a code module. In fact, Magento itself is built on top of around 60 - 70 code modules. For example, the Mage_Cms module in

app/code/core/Mage/Cms

contains the code that makes Magento's CMS features work. If you were going to create a module that added kitty cats to Magento, you might create a module named Jasondavis_Kitties and place it in

app/code/community/Jasondavis/Kitties

Re: core, community, and local — the first is for Magento developers, so don't touch. The second is for extensions that are intended to be distributed to the community. The last is for extensions that are intended to be developed locally, for a specific system.

The last bit of confusion is around design packages. The code Magento uses to render and manage its HTML is a completely separate system. That's why phtml files are located separate from code module files. You can find these files in the

app/design

folder.

Most well written, professional extensions are distributed as Magento Connect Extensions which install one, or many Magento Code Modules, and contain a number of custom phtml templates and Layout XML files installed in the base design package.

The specific things you can do with code modules are myriad, and more than any one Stack Exchange answer can cover. I wrote a series of articles that, although a little dated, is still a solid ground up introduction to Magento's coding concepts.

Finally, Re:

Any other info you wish you knew starting out with magento?

I'm a little biased on this one, but I sell a Magento debugging extension called Commerce Bug (click the small debug link). This collects and displays all the information a developer needs to know when working with Magento. It's a huge help when you're learning the system (I built it to help me learn the system way back when), and remains helpful when you're working day-to-day on a Magento system. If you're charging hourly for your work you'll make back the purchase price on your first project.

7

In addition to the @philwinkle's answer, I want to reply to your statement regarding overriding classes using the PHP include path priority.

Consider that an emergency solution if there is no other way to accomplish what you want. Often you can specify which class to use via a configuration XML setting, or using a class rewrite (also specified in config XML).
The downsides of the include path hack are:

  • Doesn't work for controllers
  • Doesn't work for anything but PHP classes (for example config.xml files)
  • You will have to merge changes into your local copies when you upgrade Magento
  • Confusing to debug, as most Magento developers simply assume Modules from the Mage namespace to live in the core code pool.
3
  • 1
    Absolutely correct. I wasn't really sure how to work this in without a separate answer.
    – philwinkle
    Commented Jun 12, 2013 at 16:06
  • I think it was a good idea to keep it separate.
    – Vinai
    Commented Jun 12, 2013 at 16:19
  • Good to know, I knew it didn't look "right" but I wasn't sure if there was another way so I got a lot to learn still thanks
    – JasonDavis
    Commented Jun 12, 2013 at 19:34
4

First of all you shouldn't think about rewrite or extend core modules or class. You must learn Magento architecture, write own test module/extension with little functionality which hasn't clean Magento, EAV concepts, layout hierarchy, Magento theme and design flow. I refer this link: Modern Magento 1.X Workflow and Development Tools. Good luck

Not the answer you're looking for? Browse other questions tagged or ask your own question.