Getting Started With Magento
videos

Easy E-Commerce With Magento

Hundreds of ecommerce systems exist, but very few can match the power of Magento. In this screencast, I’ll demonstrate how to download and install Magento to a local host, configure some of the site options, and create simple and configurable products and categories for our test e-commerce site.

Screencast

Why Use Magento?

Well there are quite a few very good reasons to use Magento:

  • A Simple Intuitive Interface
  • Easy To Download, Install & Maintain
  • Built on current technologies unlike other systems.
  • Multiple Site Functionality
  • And best of all…It’s free and open source!

Preparation

As with all successful things in life, preparation is key! Before we can install Magento we must set up a database on our server. Using phpmyadmin we create a new database called “magento”. We will use this later when we come to install Magento.

Downloading/Installing Magento

Once our database has been set up on our server the next step is to download Magento itself. To do that we need to go to the download page on the Magento website. For this tutorial we will be downloading the Full Release in ZIP format. Once you have it downloaded unzip it to the folder of your choice.

Now that we have the files on our server it’s time to install Magento, to do this we go to http://localhost/magento (or whichever folder your using) in your web browser.

Accept the TOC’s and continue onto the next page.

Pick the settings that apply to you and click continue.

Going well so far…Now fill in the database connection settings. Make sure that you hit Use Web Server (Apache) Rewrites for added SEO friendliness and if you want to change the default access address for your backend from /admin edit the Admin Path field.

Fill in the login details you’d like to use for your account and enter an custom encryption key if you like, otherwise leave it blank and Magento will make one for you.

Great, now Magento has been installed on your server, if you have installed locally there is one last step you need to take before you can login…

In your Magento folder go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

Find the session_set_cookie_params code block (Line 78) and replace it with this code:

		session_set_cookie_params(
            $this->getCookie()->getLifetime(),
            $this->getCookie()->getPath()
            //$this->getCookie()->getDomain(),
            //$this->getCookie()->isSecure(),
            //$this->getCookie()->getHttponly()
        );

On a proper webhost you do not need to do this! However as we are working on localhost we need to do this to address an cookie issue.

Tax Rules

To set up our different levels of tax we need to go to the Manage Tax Zones & Rates tab under Sales &raquo Tax. If the rule for your state doesn’t exist or has been changed recently then hit the “Add New Tax Rate”.

Save your new tax rule and you are good to go!

Categories

To create a new category we need to go to the Catalog tab on the navigation and select Manage Categories. From there we can manage and add new categories.

To create our new category we need to click Add Subcategory and fill in the details like the picture below, making sure to change Is Active to Yes.

Products

Products are key to a site but in Magento there was multiple product types as shown below…To create a new product we need to Catalog tab on the navigation and select Manage Products. And finally click Add Product

Simple Products

These are the products that have no options, such as DVD. To create our Simple product select Default for the attribute set and Simple Product for the Product Type and click Continue.

General Tab

  1. Name: The name of our new product
  2. Description: The main body description of the product; the place to really sell the product and all of its features!
  3. Short Description: The quick overview that appears just below the price on the product page; the place to grab the attention of buyers
  4. SKU: The stock code for the product
  5. Weight: The weight of the product. This can be kilos, tonnes or whatever you want as long as you keep uniformity across all your products
  6. Manufacturer: Blank by default but manufacturers can be added through the Manage Attributes Tab.
  7. Colour: Blank by default but again like the manufactures can be added through the Manage Attributes Tab
  8. Set Product As New From Date: Sets the product to new from the date you enter.
  9. Set Product as New to Date: Sets when the product ends being new.
  10. Status: If the product is Enabled and showing on the website or if it’s disabled.
  11. URL key: The custom option for how the URL for your product is written.
  12. Visibility: Where the product can be found by your visitors;
    • Nowhere: The product does not appear on the website.
    • Catalog: The product will appear on the website but not in search results.
    • Search: The product will not appear on the website but will appear in search results.
    • Catalog, Search: The product will appear on the website and in search results.
  13. Allow Gift Message:
    • Yes: Allows a gift message
    • No: Doesn’t allow a gift message
    • Config: Use the site’s configuration

Price Tab

  1. Price: The price of our product
  2. Special Price: Offers on products for limited times.
  3. Special Price From Date: The date in which the special price starts.
  4. Special Price To Date: The date in which the special price ends.
  5. Cost: The cost of the product.
  6. Tax Class: If your product requires Tax added then Taxable Goods must be selected.
  7. Tier Price: Allows for bulk discounts to be set up. Click Add Tier to add quantity discounts.
  8. Google Checkout: Can visitors buy this product using Google Checkout.

Meta Information Tab

  1. Meta Title: Information that appears in the <title> tag.
  2. Meta Keywords: keywords that apply to your product.
  3. Meta Description: A short description of your product that appears on Search Engine Result Pages.

Images Tab

Images are a key part of your product and the better quality you can get the more chance you have of making a sale, Magento allows for multiple images to be uploaded and specific images to be uploaded for the Base Image, the Small Image and the Thumbnail, as well as allowing for a label. If you want to remove an image simply click the Exclude to hide or the Remove to delete checkbox(s).

  • Base Image: The main image that appears on the product page.
  • Small Image: The image that appears in the categories/search view.
  • Thumbnail: The thumbnail of the product.

Design Tab

Unless you are using a template for your Magento store it’s best to give this one a miss, but for anyone who is curious the Design tab allows you to use themes that you have set up and allows you to choose active to and from dates as well as changing the page layout into different column blocks and so on.

Inventory Tab

  1. Manage Stock: If you’d like to track and manage stock levels then leave this set to Yes
  2. Qty: The amount of product you have.
  3. Stock Availability: If the product is in stock or not. Setting this to Out of Stock will not hide the product on the website!

The other options are best left to the site configuration however are all pretty self explanatory if you wish to set them to your needs.

Categories Tab

Your product can appear in multiple categories; simply click the checkbox of the category you want it to appear in!

Related Products / Up-sells / Cross-sells

With related products, up-sells and cross-sells the interface to add is same, to add a product simply select a field you wish to search by and click the search button, a list of products matching your criteria will appear. Click the checkbox next to the product and it will appear as a related product/up-sell or cross-sell as applicable.

Product Reviews / Product Tags / Customers Tagged Product

These are all added by users and can viewed from the tabs.

Custom Options

These are custom options that you can add to your product. To add a custom option click Add New Option and fill in the details.

Managing Attributes & Attribute Sets

Attributes are the options that make up your products, for example colour, weight and so on. Attribute sets are sets of attributes that make a whole product and allow us to make configurable products.

Attributes

To create a new attribute/view our current attributes we need to go to the Catalog tab on the navigation and select Attributes and then Manage Attributes. To view a attribute simply click on the row, to create a new attribute click the Add New Attribute Tab.

Properties Tab

It’s best to use an convention when you are naming your attributes, as your list grows it will make it easier to find what you are looking for. I like to use options_option_product which for this product would be options_colour_nettuts_shirt. We must set our scope to global and Catalog Input Type to Dropdown in order to create our configurable product(s). We are only applying our Attribute to Simple Products and Configurable Products. In order to use this attribute in our configurable products we must choose Yes on the Use To Create Configurable Product field. We must also select Yes on the Visible on Product View Page on Front-end field in order to make the attribute visible.

Manage Label / Options Tab

Next we need to set up the options for our user to select from when choosing there product. In our example we are using Colour as our product option.

The title is what the visitor will see above the dropdown, with Magento we can define what the admin sees and what the user sees making it easier to track options with additional information, in the example we have called our Title, Colour. If we leave the Default Store View blank it will copy what we have entered into Admin.

To add the options for our product click the Add Option button for the number of options you require, in our example 3. Like the title if we leave the Default Store View blank it will copy what we have entered into Admin but we can use the Admin field to add more information, making it easy to fulfill orders for example. We use position to order our options and the Is Default radio box to define which option is default. We can easily delete any option using the button to the right. Once we have all the options we want click Save to return to the attributes page.

Attribute Sets

Next we need to set up our Attribute Set in order to create our configurable product. We navigate to the Catalog tab on the navigation and select Attributes and then Manage Attribute Sets. Like the Attributes page we have a list of our Current Attribute Sets; Default should only be appearing. Click Add New Set.

Again like our Attribute we should use a convention to name our Attribute Set…so matching our Attribute; options_size_tshirts. Since we have no other Sets we are going to base the new one on Default.

To include our Attribute into our Set we simply need to click and drop it into the General group from the right hand list. Click save and our set is complete. Going well so far…

Creating A Configurable Product

Creating a configurable product is very similar to creating a Simple Product. To start we create a new product. But we need to change the Attribute Set to the one we just created and the product type to Configurable Product and click continue.

Next we need to pick the Attributes we would like to use in our product. Only attributes with a scope of Global, type of dropdown and the option to create a configurable product set to yes can be used.

The only tabs that change are the Inventory tab and an new tab has been added called Associated Products which is where we will add our options. Once we have filled in all our details we need to save and continue edit before we can begin to add our Associated Products. Unlike some other ecommerce systems Magento creates simple products that are hidden in order to create a configurable product.

To create the options we are going to use the “Quick simple product creation” tool to make our Simple Product options. For the name and SKU fields you can let Magento auto generate these but for added control I suggest that you fill these in yourself. In the example we are creating a green shirt option. We have filled in the Name, SKU, Weight and have set the product to Enabled. However we must set the visibility of our product to nowhere. From the drop-down we select the attribute option we are creating for and set the price. For the default option we don’t enter a value and it will use the price we set on our configurable product but for the other options we enter the difference between the configurable product and the option. So if the Green top is $15 and our configurable product is $20 then we have to enter -5.00 as our price. We then need to set the Qty for the option and the Stock Availability to In Stock and click Quick Create. We repeat this process until we have added all of our options and click save. Our configurable product is now complete. If we view our products page we can see that Magento has created the options as simple products for us that have been hidden. Making tracking stock much easier!

Congratulations

Well done, you have just downloaded and installed Magento to your localhost, you have created a simple product, a custom attribute and attribute set, a configurable product using your custom attribute and a category. I hope that you have learned some of the basics of Magento and I wish you all the best during your endeavors. If you have any questions please leave a comment below and i’ll try my best to help you out!

If you a real go getter and would like to get into some of the more advanced topics or would like to learn more than I suggest that you check out the Knowledge Base on the Magento website as well as Designers Guide if you’re interested in customizing Magento more.


Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • Martin

    Does anyone have any examples of live websites which are using Magento for their eCommerce? I would like to see how the speed compares to other sites from an end-user perspective.

    From a back-end perspective, it seems to suck badly – surely it can’t be normal for saving a product to take 4 minutes when I’m running on my localhost!

    • Craig

      There’s obviously something very wrong with your set-up. It doesn’t even take 4 seconds for me (on an XAMPP test server).

      • Anon

        4 seconds is still a lot though. I also find magento to be really slow, 3-4 seconds to navigate in the admin section is just ridicoulus.

  • Alfredo

    I’ve been using Prestashop for a month now and find it VERY easy to manage.

    The bad news is that it still has no a good base of users, so the help in the forum arrives late.. or never.

    There are not much templates (free or pay) to choose from.

    Try Prestashop and you will find that in less than an hour you can setup a pretty descent store.

  • http://www.hakomat.com ali

    thanks great work

  • hits

    thanku..

  • shakti

    Thanks man ….All others forget to tell the last step to configure varien.php file
    …..u don’t

  • WS

    Great video! But…
    I downloaded & installed WAMP. I unzipped and added the magento files in the localhost folder wamp/www/magento so far so so good. But when I try to access magento in WAMP (http://localhost/magento/) I get this error message:

    Fatal error: Method Varien_Object::__tostring() cannot take arguments in C:\wamp\www\magento\lib\Varien\Object.php on line 488

    which is this:
    public function __toString(array $arrAttributes = array(), $valueSeparator=’,')
    {
    $arrData = $this->toArray($arrAttributes);
    return implode($valueSeparator, $arrData);
    }

    Is the problem that something is incompatible with the 5.3 version of PHP?
    What do I do now?
    Thank you for any help.

    • Lakeshia Burnside

      I’m getting the same error and i have the same directory setup. Did you get this resolved?

    • Zoran

      Just switch to 5.2.11 version of PHP

  • RV

    To me the Joomla – Magento bridge offer by Yireo (http://www.yireo.com) is a brilliant tool. It allows you to do most of your templating and content management with Joomla yet still have the e-commerce advantages of Magento.

  • http://www.redstage.com/magento Anthony

    Killer Tutorial! Magento is truly amazing… It’s rare to see an open source platform that can do so much. If anyone is having trouble or wants some custom Magento work, let me know! Thanks again for the excellent article.

  • http://www.magentomagik.com Ashish

    Do you know if you can customize Magento to serve as a Rental store?

  • maicon

    show

  • http://screencastworld.com Anthony

    Really thorough tutorial. Great work!

    I’ve been using Magento Commerce for almost 2 years now and it is by far the best OpenSource PHP Powered eCommerce platform out there. People say it’s slow but that simply isn’t the case if you know how to configure your environment correctly.

    This is why over on ScreencastWorld.com I’m providing similarly high quality Magento Tutorials, Magento Screencasts, Magento Video Tutorials, and Magento How-To articles, all designed to show people how to get the most from Magento Commerce and help their eCommerce business be a success.

  • http://www.ijewebservices.com ijeweb

    This was a great tutorial. I love Magento! – It’s very robust and offers features not found on most open source shopping cart systems. I’ve had the opportunity of working on lots of Magento projects. The first time I used Magento was around 2 years ago and haven’t stopped since! All I can say it’s that this system has a very steep learning curve and it’s not for everybody. I’ve also done a lot of Design conversions for it. I love how complete it is.

  • http://www.china-mobiles.org 手机

    博客写的还行啊,模板不错啊,博客一定要经常的更新文章啊,要不没人来看你了啊O(∩_∩)O哈哈~加油啊 2010年我们一去努力 回踩啊 谢谢 手机(www.china-mobiles.org)

  • http://mysillypointofview.wordpress.com Richard Feraro

    Regarding the login issue after a fresh installation, instead commenting all those line of codes which make it pretty unsecured when used in a production environment, why not detect the domain if its localhost and disable it, then restore usual function when it’s not.

    This is how I did it:
    http://mysillypointofview.wordpress.com/2010/03/24/how-to-fix-magentos-admin-login-failing-no-error-message-on-localhost/

  • http://www.unamourdetapis.com khalil

    Merci beaucoup, j’ai beaucoup appris

    On attends la suite

    Thank you, We need more

  • http://www.thereaper.de TheReaper

    Hey,

    great video, but does anybody know how to move magento from a testing to a production environment with another domain name? I have no idea where to change the URL of magento.

  • http://www.SurveySam.com Lisa

    Hi,

    Thank you SO much for the video, it helped A LOT, especially in creating configurable products.
    Thank you!!!

  • http://www.hepsiparis.com Hepsiteknoloji

    osCommerce or Magento
    I’m still in hesitate choosing Magento. Maybe oscom 3

  • http://www.goforcareer.com vipan

    Thank you, We need more………

  • http://www.magentomagik.com Ashish @ Magento Themes

    Anyone tried Magento as Rental store yet?

  • http://www.previousdesign.com Darpan

    Nice tutorial
    Thanks

  • http://elliscreative.co.uk Matthew Ellis

    Ed! Loved this tut. Currently involved in my first Magento project and this was really helpful. Good to hear another Yorkshire voice too!

  • http://www.innovativeinfosolutions.com innovativeinfosolutions

    Nice Information
    I am using magento in several projects
    And ur information means a lot to me

  • anne vandelanotte

    Could you explain how to get a single product sku show up in the cart and order instead of the configurable sku. fi I have a config;sku – tshirt, each tshirt has a different single sku fi; 1254,1255,1256,… i need that single one show up in the cart to be able to process the order.
    Is there a simple method in magento?
    Thank you
    anne

  • erm

    Can’t pause this video? Wtf!

  • Amit

    Thanks for wonderful Tutorial !!

    I have just installed magento 1.5.1 . But i am not able to see page other than home page. Like i have created a product from admin , when i search this it says page cannot be displayed or even when i created a category this appears on home page but when i click on this this says ..”Page cannot be displayed”

    Do you have any idea about this

    Thanks
    Amit

    • http://www.xped.com Andy

      Hi Amit,
      you will need to create category and in that category display settings set the category to either show products or static block or even both.

  • Mario

    Exceptional tutorial, I learned quite a lot from following your tutorial. Thanks!

  • http://www.orangecollarmedia.com/ Magento Development

    I love it that there are so many tutorials to help with installing magento. It can be really tricky and confusing and things like this really help.

  • http://buymanilacondo.com Cj Belo

    Thanks for posting this wonderful tutorial. I am currently in the stage of getting to know the whole system and I’m enjoying it. Magento seems to be easy to understand and learn but what I really want to learn is how to customize or create my own template or theme. This is a good start anyways… Thanks for sharing your knowledge. Good job!

    Cheers!

  • http://www.trapartists.com Preston

    I like this article. But i have a question that hopefully several of you can answer and help me out. I have yet to build an ecommerce website but could possibly develop one soon and id like to start practicing and getting use to some sort of OPEN SOURCE ecommerce. Ive heard of many so i want to ask, what is your favorite to use and why? At the moment, im thinking of Prestashop. But ive also heard of magento, zen cart, virtue mart, and os commerce. What do yall think?

    i apologize if this is not the best place to ask this question.

  • cathy

    please teach me how to add css to make the website looks nicer.

    • http://www.xped.com Andy

      Hi Cathy,

      if you are working on a particular theme then go in the styles.css or that particular theme and then add your style.
      skin>frontend>yourtheme>css>styles.css

  • Aaron

    Fantastic tutorial, many thanks :)

  • Wayne

    Great Job!!! Thanks for spending your time to do so…

  • Pradeep Thakur

    Thanks, nice docs…………

  • nipam

    great tutorial help me alot…thankyou…

  • http://www.cesvoir.com srinivas

    Good stuff……………. i like it

  • faizan

    PHP extension “mcrypt” must be loaded.
    PHP extension “curl” must be loaded.

    plz help error occur during installation

    • Sam

      To load php curl go to php.ini file and remove ; from ;extension=php_curl.dll and restart apache server.

  • http://twitter.com/therealgoSolid goSolid

    Great post!

  • Binding Digital

    Binding Digital, great post and really useful information for anyone wanting to use magento

  • Andy Carter

    Magento ecommerce solution has become the most demanding open source platform of today’s online retail store businesses since it provides a tremendous advantage. With Magento Ecommerce Platform, online store owners are being given the capability of handling multiple stores and facilitate a more systematized browsing of items for sale. Improved management of customer’s orders and having more developed promotional
    or advertising tools also becomes possible with Magento Ecommerce.

    Andy
    iLoveMage

  • testtoabc

    started my career in magento. expert in wordpress and codeigniter. http://www.webinbangla.com/contact-me/