Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento learning curve and best tips

Tags:

php

magento

Ok, magento is new to me, and in fact ecommerce site development itself is new.

Magento seems to be extremely difficult to get to grips with - I have spent 3 days now going round I'm circles trying to create a custom theme and modules.

The documentation is poor, the code and structure appears obfuscated - when will it get easier?!

Are there any specific tips or advice that you can offer for learning magento properly ? For any other developers out there - how long (full time development) did it take to start to make sense of magento and to get things done quickly?

like image 344
David Avatar asked Aug 05 '10 21:08

David


2 Answers

AS Phliplip said, have a understanding of the MVC pattern and the way Zend Framework implements those. Especially the Controller part, Model and View are handled differently.

Make sure you use a descent editor (e.g. eclipse+pdt) which allows you to click at any function and it will show you the source as well as setting up xDebug so you can travel though some code while its running and see the values of the variables.

Magento gets controlled by many config.xml files in each module which get merged to one big xml. So you need to understand how you setup a module and what Mage::getModule('yourmodul/xx_yyy') does. as well es Mage::getResourceModule(), Mage::helper(), Mage::getBlock()

Make sure you are 100% familiar with the class Varien_Object,... and become a fan of it :)

Try to understand the Magento Collection class which basicly wraps any mysql query returning more then one result

Get familiar with a the database eav model

When you are planning on altering the database,... you should make sure you understand the magento installer.

There is lot more.... it took me I don't know 6 month to get a good understanding of it...

like image 161
butterbrot Avatar answered Nov 15 '22 15:11

butterbrot


The first step towards getting anything done in Magento is to read the Magento Design Guide.

Once you are familiar with the XML/Block system, you can make changes to the design portion very easily. Once you're comfortable with that, you're going to want to take a look at every folder in your base Magento install. Each folder has a purpose, and having an understanding of what each one's function within Magento will help you when you decide to start making modules.

Alan Storm has a great tutorial for your first module here. I'd read that carefully and get the books that he suggested; they are great resources.

Finally, start tracing functions through the code. I basically have grep -R available at all times to find out where methods are defined so I can better understand what their capabilities are. Because of the size of Magento, sometimes that's the best way to find answers.

Good luck!

like image 28
Nic Avatar answered Nov 15 '22 16:11

Nic