Book Image

Building E-commerce Sites with VirtueMart Cookbook

By : John Horton
Book Image

Building E-commerce Sites with VirtueMart Cookbook

By: John Horton

Overview of this book

VirtueMart is a premier eCommerce solution powered by Joomla!In Building E-commerce Sites with VirtueMart Cookbook you will learn how to create a full-functioning and attractive eCommerce solution with VirtueMart. You will be shown how to install and configure VirtueMart, how to set-up and run your store day-to-day as well as configure and customize the look and feel of your store. With this book by your side, you will be able to overcome as problems setting up, administrating and customizing your eCommerce store! This book finishes with blueprint projects meaning that getting started with VirtueMart is even easier for the novice and aspiring site builder or developer. If you have always wanted to create a professional-looking store, but are worried about the complexity and difficulty involved, then this book is for you! With numerous recipes, practical tips and solutions Building E-commerce Sites with VirtueMart Cookbook will take you through every step required to achieve eCommerce success.
Table of Contents (17 chapters)
Building E-commerce Sites with VirtueMart Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a menu for your must-have information


So where is all the information that we have entered into VirtueMart so far? It is tucked away in the VirtueMart database waiting for someone to summon it. The way that we achieve this is by linking to it.

Getting ready

Log in to your Joomla! control panel if you are not there already.

How to do it...

We will create a menu of links to the page that we created in the previous recipe. Then we will create a Joomla! module. A module is a deployable container. We will then be able to assign our menu to the module and deploy it somewhere useful for our customers to use.

Creating the menu

  1. In your Joomla! control panel navigate to Menus | Menu Manager | Add New Menu. You will see the following screenshot:

  2. In the Title box enter the title that you want to appear for this menu, such as Our Shop or something similar.

  3. In the Menu type box just make it the same as the Title but all lower case and replace spaces with underscores. So mine would be our_shop.

  4. In the Description field I put all the must-have links. All of the examples I give should have the marks removed. Click on Save & Close in the top right of the screen.

  5. Now hover over the Menus drop-down and then hover over the newly created menu. In my case that's Our Shop and click on Add New Menu Item. This might look like a somewhat complicated page but for now there is very little to it. We will revisit much of what we skip over when we look at the chapters on SEO and also design. The following screenshot depicts the important part of what you will see.

    This is what we need to do for now.

  6. Click on the Select button to the right of the Menu Item Type label. Scroll down to near the bottom of the pop up window and choose Displays vendor details.

  7. The next box down, Menu Title, refers to the actual text that will make up the menu item (link) so put something like About Us. Click on Save & Close. It should be simple now to add as many standard VirtueMart links as you like to this menu. Why not go ahead and add a link to your terms of service?

  8. Click on the New button near the top-right of the screen to get the New Menu Item configuration screen.

Creating the container module

This is made nice and simple for us by the Joomla! system. Click on Menus and you should see a list of menus. In my list there are just two. One main menu and the other is the menu we just created. Look over to the right of the menu we just created and there is a helpful hint on what to do next, as shown in the following screenshot:

  1. Click on the Add a module for this menu type link shown in the previous screenshot. The Joomla! system has kindly created a ready-to-configure module for us. All we need to do is fill in the blanks.

  2. We could have got to the same place manually by navigating to Extensions | Module Manager | New. Also, note on the right-hand side that our menu has already been assigned to this module, as shown in the following screenshot:

  3. We would have had to do these ourselves if we had decided to go the manual route. So let's finish off this module and display it to the world. Choose a title for our new module and click on the button to choose if you want the title to be shown on your site.

  4. Try both ways if you are not sure what the difference will be. The following screenshot shows you exactly where to do this:

  5. Finally, we need to decide where to show the module on the site. Click on the Select position button and choose where to display the module. If you are new to Joomla! this is a really good time to experiment.

  6. Choose the position-7 position which is top-left.

  7. Click on Save and have a look at your site to view the changes, as shown in the following screenshot:

How it works...

VirtueMart is a component of Joomla!. Therefore it is often necessary to interact with Joomla! itself in order to achieve things in VirtueMart. Just then, we basically made a Joomla! menu using predefined (by the VirtueMart component) VirtueMart links, then placed that menu in a Joomla! module, and displayed it to the world.

There's more...

If you are new to Joomla! and all these modules, menus, and positioning them are getting you down, then the next recipe might help. We will be enabling and positioning some of the everyday VirtueMart modules such as the shopping cart. This should help you begin to understand the relationship between the different aspects of Joomla! and its components. We will do this in the next recipe.

Even if this apparent complexity does not evaporate entirely, it is enough to know at this stage that the complexity is for good reasons. It provides us with the properties of flexibility and extendibility. When you finally get your head round Joomla!, you will realize you can do almost anything with it.

Also every recipe in this book, although they do get more in depth, will show every click along the way. So a complete understanding will not be necessary to get things done.