Friday 20 September 2013

Magento - Understanding Theme and Path of Magento



In previous article, we learnt to install Magento Community module on your local WAMP server. Today we will start learning and getting idea for Magento architecture. Magento is bit complex for beginner to understand how exactly the flow goes and where the files exist in the directory. Actually, Magento is like a wine. The more time you spent on it, the more you will learn every day.

So, when you see “wamp/www/magento” folder within your local drive, you will see list of folders, files and other important details. The most important folders for us will be “app” and “skin” folder.
Navigate once to following paths and you will that finally you will reach to list of folders like “default”, “modern” and few others, those are called themes.

skin:
skin/frontend/default/

app:
app/design/frontend/default/

First go to skin/frontend/default/ and then copy “default” folder and paste it, rename it as “yourtheme”. Same way, do for app/design/frontend/default/, copy default folder, paste it and rename it as “yourtheme”.

skin: (Here js, css and images will come)
skin/frontend/default/yourtheme

app: (Here xml , phtml files come)
app/design/frontend/default/yourtheme

So now you are ready with your theme which we will need to put in admin to let Magento know that this is the theme is need to load while loading the site.

So go to admin section (http://localhost/magento3/admin) and then click “System > Configuration”. You will see something like “Current Configuration Scope:” in left portion with drop down box. We will keep the “Default Config” as selected and click “Design” from left panel coming under Configurations. Click “Themes” and enter “yourtheme” in Templates, Skin (Images/ CSS), Layout and Default and then click “Save Config”

That’s it, now when you refresh your front end, it will come via you new theme. You will see no change in front end since we have not done anything with the theme yet.

But before that, we will need to understand few important point of admin section which I will cover in next article.

No comments:

Post a Comment