Top 3 mistakes by Magento beginners

20 Comments 11th MAY 2009 | Posted by Tomas Novoselic in Magento

Top 3 mistakes by Magento beginners

First of all, let me inform you that this article is for those of you who are just starting with Magento. If you are a Magento expert, you will probably know this.  Consider it just a reminder for those who use Magento for first time. There are three common mistakes that most people do when they try to use Magento for first time, so read this article and you won’t be one of them.:)

  1. First mistake is downloading Magento’s full release and trying to upload it using ftp. Much easier solution is using Magento downloader method and you won’t lose upgrade capability.
  2. More experienced PHP developers will first read Magento Designers Guide before they try to style Magento, but others won’t and that’s the mistake number two. Since Magento has great theme fallback system there is really no need to touch default theme. Although easiest way to make new theme for new Magento is top copy the whole theme to a new folder, don’t do that. Copy only the files you will need: from /design/frontend/default/default/ directory to /design/frontend/default/YOUR_NEW_THEME directory. Do the same thing with /skin/frontend/default/default/ Congratulations, you have your own theme just like that. All that left is to apply new theme (System->Configuration->Design) and you are ready to do with your theme files whatever you want.
  3. Third mistake is modifying Magento core files. What files are core ones? All what is in app/code/core folder. If you have a need to modify some of those ones, you just need to duplicate that file in the same directory path to app/code/local. For example, if you need to modify the file
    app/code/core/Mage/Checkout/Block/Success.php
    copy it to
    app/code/local/Mage/Checkout/Block/Success.php
    and leave the core file intact. This way your Magento will be more bullet-proof to future updates.

I hope this article can help all new Magento developers.

If you like what you read, please share it.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Yahoo! Bookmarks
  • Reddit
  • Technorati
  • Twitter
  • StumbleUpon
  • LinkedIn
  • Netvibes
  • FriendFeed
  • NewsVine
  • Sphinn
  • Tumblr

There are 20 comments (Add Yours +)

  • Nice article and I agree with all of it!

  • Great list. 4th mistake I would say is to manage features manually instead of using the configuration.

    I inherited a site where all instances for wishlist, reviews, etc were all commented out in PHP files when switching those features on and off is as easy as going to System>Configuration and disabling the features there. System>Configuration>Advanced>Advanced is a great little switchboard

  • I’ve developed several Magento themes. I completely agree with #1 and #3 however I think that #2 needs some modification:

    The first two themes I developed, I did exactly what step #2 prescribed. What I realized was that when a newer version of Magento came out, I had to manually merge all of the changes from the newest Default theme into my custom theme. I discovered was that it was only necessary to copy the files into my custom theme that I needed to modify. My custom theme directory (/app/design/frontend/default/YOUR_NEW_THEME) ended up with a few dozen files in it, as opposed to the hundreds of files in the default theme.

  • I would add a 4th:
    leaving install.php on a production server after installation…

  • Regarding the third mistake: better use model/block rewrites together with inheritance to reduce code redundancy. This saves a lot of time after upgrading to a new version which might contain modifications (bug fixes, etc.) in the classes you have modified.

  • BelowZero Says

    I totally agree with Erik Hansen. You don’t have to copy the entire theme. Just copy the files you want to change.

  • Erik, BelowZero, you are correct. Original article was now slightly modified ;)

  • Another vote for ‘just whats needed’ on copied theme files (#2). Else you’ll be dif’ing thousands, as opposed to a couple of dozen files, each time you upgrade.

  • Excellent document! Must be in the wiki page. Really useful. Thanks for sharing.

  • Regarding #2 I totally agree with you guys!
    @Tomislav: Tnx for modifying original article ^_^

  • Prashant Says

    If we simple copy
    app/code/core/Mage/Checkout/Block/Success.php
    to
    app/code/local/Mage/Checkout/Block/Success.php

    and then will modify the file under app/code/local/Mage/Checkout/Block/ then will the modification will apply or not. And what exactly for “app/code/local/” folder is made in magento.

  • thanks for this article. I’ve one issue with advice nr.2 – “Copy only the files you will need”. If I use “blank” theme as source of the customized one, how can I configure Magento to fallback to “default/blank” instead of “default/default”? Now I’ve to copy all files of blank theme into my own directory though I don’t want to do it this way.

  • Great article! Simple, short, but invaluable tips. Thank you!

  • vrrt – I think you can make “blank” your default, so that fallbacks will work as prescribed. I also think that Magento intends to support more fallback levels in the future.

  • Thanks for this info.

    This is my first go at a Magento site. I am converting a heavily customized oscommerce site to Magento. I chose to use a purchased theme as my base (using that purchased theme for another store front). Copied it from the default/custom_theme to custom_theme/default and went from there. So in my admin I have the package name as the custom folder and the default is default, does this make sense? I am basically modifying 3/4ths of the xml and template pages so I don’t know if the fallback portion applies to me or not yet. Do you think I should still use the fallback default?

    But I did not know about copying core files to the local folder and it picking them up from there. I just did that to add a custom “tab” to my product views page, excellent. I will now be able to go to town on tutorials that involve modifying some core files!

  • When trying to do #3 in version 1.3.x it doesn’t seem to work. What is the easiest way to changes the core code in the new version??

  • @Casey,
    It still works in current versions (1.3.2.2). Make sure there are no errors in your local file and that the folder structure matches what’s in core/.

  • mogento sucks Says

    What is the hyrerichal structure of core files. It seems to me that mogento core is never meant to be customizeable. The db structure is pathetic. Can someone clarify this??

  • Hello Dear
    I want to show all the products which have Status In Stock, from all categories on magento home page, So can you tell me how to do this.
    Plz comment on any post here
    VaseemAnsari.blogspot.com
    to let me know the answers

    I want these things to implement so can u help me
    1. i have created some demo.phtml files
    now i want to call it in direct url like abc.com/demo
    so is there any method i can call those static phtml files created by me directly in url of website.
    Or you can mail me at Vaseem@ doomshell.com

  • @vaseem ansari,
    Sorry, but your reply is totally off topic, therefore this is the only way I can help you.

Leave a Comment

Magento Design and Development | Magento SEO | iPhone Application Development Web Application Development with ZEND | WordPress Ecommerce | WordPress development
Sitemap

Inchoo - webappsolutions | 2009