Building E-commerce Sites with VirtueMart Cookbook

By John Horton
  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Setting Up Shop

About 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.

Publication date:
June 2013
Publisher
Packt
Pages
310
ISBN
9781782162087

 

Chapter 1. Setting Up Shop

In this chapter we will cover:

  • Installing Joomla! 2.5 in your web space

  • Increasing the Joomla! session lifetime

  • Installing VirtueMart and the core add-ons

  • Familiarizing yourself with VirtueMart

  • Removing the VirtueMart AIO component

  • Creating a link to our store

  • Removing the currency not defined error

  • Filling out the company information section

  • Fixing the safe path warning

  • Setting up your company identity in VirtueMart

  • Creating a menu for your must-have information

  • Displaying the core VirtueMart menus

 

Introduction


Welcome to Setting Up Shop. As the name suggests, by the end of this chapter you will have a working Joomla!/VirtueMart installation, with some core e-commerce features such as a shopping cart, product search, and fully functioning backend control panel.

The first step is to install Joomla! itself, then VirtueMart and its core components, and then we move on to the first steps of configuration of the VirtueMart. Then we will create the must-have e-commerce pages such as About us. Next we create a custom menu to link to the must-have pages that we just created, and finish up by arranging some core e-commerce modules such as a shopping cart.

Let's not waste any time. If you have your Joomla! site already, you can skip this recipe. If you haven't got one, you will in about 10 minutes.

 

Installing Joomla! 2.5 in your web space


Let's get started by downloading and installing Joomla!

Getting ready

Head on over to www.joomla.org. Click on the Download button and grab a copy of Joomla! 2.5 and place the ZIP file on your desktop. Fire up FileZilla and make ready a connection to your web space where your new VirtueMart store will be "set up." If you have never done this before, follow the quick guide.

Connecting to your web host with FileZilla

This is really easy. Perform the following steps:

  1. Run FileZilla.

  2. Navigate to File | Site Manager | New Site.

  3. Enter the details shown in the following table:

    Field

    Value

    Host

    The FTP web address supplied by your host. Often this is the same as your website URL.

    Logon type

    Normal.

    User

    Your username supplied by your web hosting company.

    Password

    Your password supplied by the web hosting company.

    The other values are usually fine as they are.

  4. Click on Connect.

Your web space is on the right of the FileZilla window and your computer is on the left. You can move files about in FileZilla in a manner similar to your operating system. Browse to the folders you require on the left and right. Then do drag-and-drop between them as shown in the following screenshot:

Have your details to hand

Log in to your web hosting control panel. You will need a MySQL database and this will need to be created in your control panel. When you have done so, here will most likely be a database details screen where you can grab the details ready for the installation of your Joomla! site, namely Database name, Username, Password, Hostname, and Database type, usually MySQLi.

How to do it...

Here it is in 12 simple steps and about as many minutes to a functioning Joomla! site:

  1. Using FileZilla, drag the file Joomla_2.5.x-Stable-Full_Package.zip from your desktop to your web space pointed to by your web store URL. This should ideally take about two minutes, but if you have a slow internet connection (like mine), then you might like to grab a cup of tea, and perhaps a walk in the park.

  2. In your web hosts file manager find the file you just uploaded and unzip it.

  3. In your web browser go to the home URL of your new site, www.yoursite.com. You will see the following screenshot:

  4. Choose your language such as English (United States) from the list and click on the Next button in the top-right corner. Now we have the following screenshot:

    Tip

    If you have any (No) indicators in the top box, then there is an incompatibility between Joomla! and your web hosts. You will need to contact your web host to fix the problem. If you have any (On/Off) indicators you can proceed but make a note of the warning and research its potential implications.

  5. When you're ready to proceed, click on the Next button.

  6. The next screen asks you to agree to the GNU General Public License. The license allows you to do almost anything with Joomla! for free! What's not to agree about? Click on the Next button again.

  7. On the next screen we need to fill out our database information from our web hosts. The stuff we got ready earlier. In the following screenshot, enter your database details that we prepared in the Getting ready section. For Database Type choose Mysqli. Click on Next. Refer to the following screenshot:

  8. The next screen is usually left blank as it is not needed. Click on Next.

  9. Nearly there. Choose a Site name, Username, and Password. Enter your e-mail address for the Joomla! system to use, to contact you.

    Tip

    If you are new to Joomla! it could be useful to click on the Install sample data button. These are some dummy articles and categories that flesh out your new site. It makes it easier to click around and explore the admin control panel to learn what is going on. As we will cover very little (except VirtueMart essential) Joomla! specific stuff, it is probably a good idea to do this if you are new to this.

  10. Click on Next.

  11. Click on Next once again.

  12. Click on the Remove installation folder button to remove the installation folder and prevent someone from reinstalling over all your hard work.

Go and explore your new Joomla! control panel and your site by clicking on the appropriate buttons in the top right.

How it works...

So what just happened there was that we ran the Joomla! install. In the process we gave the system everything it needs to create a site and the admin features needed to develop it. Now, we are almost done as the next step is to install the VirtueMart component to turn our world beating CMS into an e-commerce selling machine.

 

Increasing the Joomla! session lifetime


Some of the recipes we undertake will often mean that we start the work in some part of the Joomla! control panel and then leave it partly done while reading further or perhaps gathering information elsewhere. Joomla!, in an effort to be helpful and secure, will log us out after 15 minutes.

Getting ready

I would suggest that changing this session lifetime to 60 minutes is sufficient to virtually always avoid entering loads of data, only to have that data wiped because we hadn't saved it yet and Joomla! logged us out.

How to do it...

Log in to your Joomla! control panel using the username and password you chose in the first recipe:

  1. Now from the Joomla! drop-down menu navigate to Site | Global Configuration, then find this area on the right-hand side of the screen.

  2. Now simply change the 15 in the Session Lifetime box to 60 and click on Save in the top right.

How it works...

The change of the session lifetime to 60 changes an entry in the Joomla! configuration settings and prevents the system from logging us out after 15 minutes of inactivity. That period is now 60 minutes and we are much less likely to lose some configuration settings before we had a chance to click on Save.

Tip

It is still possible to lose work and when it does happen because we have increased the session lifetime it is possible that the amount of work we lose could be greater than before! So save regularly when prompted and whenever you have some settings or awkward configurations in a form that is unsaved.

 

Installing VirtueMart and the core add-ons


After this super quick, complexity free recipe, you will have a new option in your Joomla! components menu, that is VirtueMart. Clicking on the VirtueMart component link will open up a wealth of configuration and settings comparable to many standalone shopping cart systems.

Getting ready

Let's get the files necessary to do the installation. Head over to www.virtuemart.net and click on the Download tab. Download the latest stable version available. Got it? Let's go.

How to do it...

Let's install VirtueMart:

  1. Unzip the downloaded file named com_virtuemart.2.0.18a_extract_first.targz.zip. This reveals two more files.

  2. Log in to your Joomla! admin control panel by going to www.yoursite.com/administrator, navigate to Extensions | Extension Manager from the top menu and you will see the following screenshot:

  3. We will use the first option labeled Upload Package File. Click on Browse and find the recently extracted VirtueMart file named com_virtuemart.2.0.xx.tar.gz.

    Note

    Make sure that you do not select the file ending with … ext_aio.tar.gz as we are not ready for that one yet.

  4. When you have selected the correct file you can click on Upload & Install.

  5. You should now see something like the following screenshot. Don't worry about the warning. We will come to that in the next recipe when we do some basic configurations:

  6. If you get an error about the size of the upload or your browser just whirs around and never completes the task then do this: use FileZilla to upload the com_virtuemart.2.0.xx.tar.gz file to the TMP folder in the root of your Joomla! installation folder.

  7. You can now use the section labeled Install from directory to get things done.

  8. After uploading the file just add /com_virtuemart.2.0.xx.tar.gz to the end of the default file path and click on Install. All should now be good. Any time the Joomla! package installer fails to upload and install a package then you can do the same.

    Tip

    Any time the file is too large for the Joomla! Upload Package File option, just transfer it with FileZilla to the TMP folder and install via the Install from directory option. For security reasons, delete the package file when you are done!

  9. The core VirtueMart product is now installed, but before we conclude this recipe, let's add the VirtueMart AIO (all in one) extensions. This is all the virtually essential, predeterminable VirtueMart settings and modules, all of which are neatly lumped together in one installation.

  10. From the same Extension Manager: Install page, click on Browse, select the com_virtuemart.2.0.xxx_ext_aio.tar.gz file, and click on Upload & Install.

  11. You might have noticed the following message:

    That is because once you have used the component and it has done its work it is no longer necessary to leave it installed. We will deal with that when we do some basic VirtueMart configuration later in this chapter.

How it works...

The two files that we uploaded and installed constitute an entire e-commerce system. They contain everything that you need to handle such as the complex products and shipping options, attach to payment gateways, and managing your inventory.

There's more...

Now would be a good time, especially if this is your first VirtueMart installation, to go and check out some of the features, buttons, and menus. Don't worry about configuring anything, we will start all that in the next recipe. Also, you will probably keep getting that Safe path empty... warning. Again, we will deal with that soon. From the top menu navigate to Components | VirtueMart. The following is the screenshot of VirtueMart:

 

Familiarizing yourself with VirtueMart


We will have a very brief look at each major VirtueMart section. By the end of this exploratory recipe, any reader new to VirtueMart will have a good feel for where to get things done.

Getting ready

Log in to your Joomla! admin panel.

How to do it...

Let's get used to VirtueMart with a hands-on exploration:

  1. As we have done before, from the Joomla! control panel navigate to Components | VirtueMart.

  2. Click on the big Products button. You could also use the left-hand menu and click on Products, then Products again to arrive at the same place.

    Tip

    We will be spending plenty of time here in the next chapter. It is where we can add, remove, configure, enable, and disable the actual products that we sell.

  3. If you look on the main left-hand menu you will see that in the Products drop-down, as well as the actual Products link, where we are at the moment, there are a number of other product-related options such as:

    • Product Categories: This is where we create the structure of our catalogue

    • Custom Fields: This is where we can define detailed attributes that we can then apply to our products

    • Inventory link: This helps us to monitor the stock levels

    • Taxes and Calculation Rules: This is just about gets its own whole chapter (Chapter 3, Shipping and Taxes)

    • Product Reviews: This kind of speaks for itself

  4. Have a click on each of the options on the VirtueMart screen to see what is there. We will go into more detail on each.

  5. Click on the Orders and Shoppers drop-down menu. You will see the following options:

    • Orders: This tops the list and it is potentially the most exciting link. When your store is running right, you will spend a lot of time here, managing the orders that your customers have made.

    • Revenue Report: This allows you to sort your ordered data by a multitude of criteria and the date ranges in order to see your sales, refunds (gasp!), and so on.

    • Shoppers: This lets you view and edit the details of all your customers.

    • Shopper Groups: This lets you create different types of customer, if perhaps you want to distinguish between wholesale and retail.

    • Coupons: This allows you to create exciting discounts and coupon offers.

Following are the next set of buttons:

  • Manufacturers: This helps you in managing and arranging the manufacturer, if the manufacturer is an important distinction in your catalog.

  • Shop: In this menu we will do the fundamental configuration, starting in the next recipe.

  • Shipping and Payments: This option will teach us how to devise simple yet appropriate options for our customers, to have their orders sent, and to pay you.

  • Configuration: This menu is deep and wide. We will be popping in here throughout many of the chapters. Notice how some of the options have long sprawling pages and multiple tabs as well (yuck!). I promise it is not as bad as it looks and we will break it down into the individual recipes as we proceed.

  • Tools: This menu consists of a number of links to different help sources including the VirtueMart forum.

  • Tools and Migration: This section consists of a few kinds of Self Destruct buttons, so it is a good place to play VirtueMart Russian roulette, but we will look at how and when to use them properly too. It is probably best not to click on them yet.

How it works...

By dividing up all the functions of VirtueMart into logical (fairly logical anyway) areas, it keeps the control panel from having overly complicated forms and buttons. If it looks complex then it is only because it is unfamiliar. Soon you will be clicking and configuring without a care.

 

Removing the VirtueMart AIO component


Remember the warning we received about removing the AIO component in the Installing Joomla! 2.5 in your web space recipe? We can delete the AIO component because its only purpose in life was to install some VirtueMart settings. Now it has been done, so we will remove it.

Getting ready

We are just going to whiz through this so we can get onto the next thing. So log in to your Joomla! control panel and we will get it done!

How to do it...

Let's remove the AIO component using the following steps:

  1. Navigate to Extensions | Extension Manager and then click on the Manage tab.

  2. You can find the required entry quickly by typing allinone into the Filter box and clicking on Search.

  3. Select the VirtueMart_allinone checkbox. The following is a screenshot showing all of these steps together:

  4. Now click on the Uninstall icon and then we can move on, burdened with a little bit less baggage than before.

How it works...

Very simply we have removed a component as a matter of good e-commerce housekeeping, sort of like "taking out the trash".

 

Creating a link to our store


The next minor issue is of being able to visit your store from the front end. If you go then you will find that the front end (customer facing) part of your store isn't there! We will fix this with a main menu link.

Getting ready

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

How to do it...

To create the link to your store we will use the features of Joomla!:

  1. Navigate to Menu | Main Menu | Add New Menu Item. We now have this on the left-hand side of the new Menu Item screen. Look at the following screenshot:

  2. Click on the Select button next to the first option Menu Item Type. From the list under the VirtueMart heading choose Front Page.

  3. For Menu Title, enter the word or words that will appear in the main menu. I chose Shop. That will do. We will revisit other settings when we look at topics such as SEO and templates in later chapters.

  4. Click on Save on the top right of the screen.

How it works...

VirtueMart is installed and working but we needed to create a way to visit it. This simple link to the Shop home page is the first of a number of different ways of accessing your new store.

 

Removing the currency not defined error


At this point, it is likely that you will have these unsightly errors on the home page. Let's get rid of the COM_VIRTUEMART_CONF_WARN_NO_CURRENCEY_DEFINED error. The error will be displayed as shown in the following screenshot:

How to do it...

Removing this error will only take a minute:

  1. In your admin panel navigate to Components | VirtueMart.

  2. Now from the menu on the left, click on Shop and choose the SHOP link that is immediately below it. In the top left is the following form in the Vendor Information box.

  3. Just enter a name for your business and a name for your shop. Then click on Save.

  4. Click on Configuration, then click on Currencies, unpublish everything, then select the currencies you want, and then continue. Now on the right-hand side you will see the Currency box as shown in the following screenshot:

  5. Go ahead and select your currency in the top box. In the box below that, you can click on it to accept another currency. Do this for every currency you want to accept. Now click on the Save button in the top right of the screen and the currency warning will disappear.

How it works...

VirtueMart now knows which currencies to use and has removed the unsightly error.

There's more...

When you click on the Save button, the currency warning will disappear but another message prompt will magically appear as shown in the following screenshot:

 

Filling out the company information section


We will get rid of this new distraction now.

How to do it…

Fill in the details as follows:

  1. As suggested in the message, click on the Additional Information tab just below the message itself.

  2. Scroll to the bottom of the page and you will see the following form as shown in the screenshot but without any data in it:

    Tip

    Clearly, no explanation of what to fill in the form is necessary, just to say that what you enter is what your store will show to the public. So, if you are entering a phone number or other pertinent information, make sure it is the business information that you want the world to know about.

  3. And don't forget to click on Save in the top right-hand corner when you are done.

How it works...

VirtueMart was just warning us that the most basic information required to configure the store was missing. Now it is entered, the warning is gone. We will enter more data about your company soon.

See also

  • The Fixing the safe path warning recipe

 

Fixing the safe path warning


We are making rapid progress. Remember the Safe path empty... warning? Here we will fix it.

Getting ready

Log in to Joomla! and go to the VirtueMart control panel.

How to do it...

This will only take a minute:

  1. Click on the drop-down menu titled Configuration. Immediately below is a Configuration link, click on that too. The following screenshot shows the warning that appears at the top of the page:

  2. The safe path warning requires us to make a folder outside of the publicly accessible web folder, where VirtueMart can store sensitive data (credit card info, text messages from previous partners, and so on).

    Note

    We are going to do what it says on the warning but we will choose our own folder name for a bit of added security. No website can be made hacker proof. But if we move sensitive data to an area of your web space that cannot be accessed directly or via a simple URL, then we force a would-be hacker to work harder to get that data. Once these steps are complete VirtueMart will use the new folders.

  3. Create a new folder in the location suggested. It should be the folder up from the working Joomla! install. So the new folder will be in the same folder as the Joomla! install folder but not in the Joomla! install folder itself.

  4. Name the folder something memorable but not obvious such as vm_stuff. Not too intriguing but clear to you.

  5. Inside the vm_stuff folder create another folder and call it invoices.

  6. Now we will tell VirtueMart where it is and what we called it. The actual path to this folder will vary depending upon your web host and your specific situation. So this is a consistent way to describe how to get your path accurately.

  7. In your Joomla! control panel click on Site | Global Configuration and select the System tab. You will see a box labeled Path to Log Folder. The following screenshot shows the path that we need:

  8. On the end of the path is your joomlafolder/logs. Copy the path excluding your joomlafolder/logs. Make sure to leave the trailing / on in the end. Now, we will paste it into the appropriate place in VirtueMart and add the vm_stuff at the end.

  9. Navigate to Components | VirtueMart, then from the left-hand menu, select the Configuration and choose the Templates tab. Scroll near the bottom of the screen until you see the following screenshot:

  10. Paste the path you copied earlier and add the name of the folder you created onto the end of the trailing /. Click on Save. The warning will be gone.

How it works...

By defining the safe path, VirtueMart can now put certain information a little bit further out of harm's way.

 

Setting up your company identity in VirtueMart


You might remember in a previous recipe we had entered some basic personal information such as name and address. We did this because VirtueMart wouldn't let us save/change anything else until we did it. Now we have tidied up all those niggling warnings, we can revisit and enter full details for our new store to be, as well as taking care of some of the e-commerce must-haves at the same time.

Getting ready

Now we can blast through this recipe as quickly as possible. The following are a few things to have in hand:

  • A really cool logo for your store/company. A bit more on acquiring this is in the chapter on design and layout.

  • A copy of your store's terms of service. There are lots of free terms of service templates on the web but this is one of those few areas where it might be worth spending a few dollars on advice, specific to your company, especially if you are selling something unusual, bespoke or controversial.

  • Have to hand any further legal information.

  • Here is the important one—a really neat description of your business and who you are. A kind of About us but more interesting than all those dull About us pages out there. You can use images in this description as well.

How to do it...

Here's how you can set up your company's identity in a few simple steps:

  1. Go to your VirtueMart control panel. Click on Shop, either from the left-hand menu or the big icon in the main part of the page as shown in the following screenshot:

  2. Scroll down to the following screenshot:

  3. Browse to your pre-prepared logo and upload it. Now we could finish the recipe first but it is always a good idea to save changes as you go. If you get a phone call and leave the control panel, then after a short period of time, you will be logged out and your changes will be lost.

  4. So click on Save in the top right of the screen.

  5. Scroll down and in the Description box paste your neat description. Click on Save. Repeat these simple steps for your terms of service and legal information.

How it works...

VirtueMart has just created three pages based on the information you just entered. Now if you visit your shop front then you will notice they are not there yet. What we need to do is make them available to your customers through some links. That will be the topic of the next recipe.

 

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.

 

Displaying the core VirtueMart menus


Now we will display and arrange some of the VirtueMart modules. Let's try and do this in a way that might be used in our final trading Joomla! e-commerce site. Of course, you probably have very specific layout plans. But this recipe should show enough of the ins and outs for you to make any modifications to suit your plan.

Getting ready

First we need a plan. Here is a good one. We want a product search in the top right and a product category box on the left of the module. Next we want a shopping cart on the right with a currency choice selector under that. Basic, but functional.

How to do it...

Let's start with the product search box. This is distinct from the regular Joomla! search box that searches the Joomla! articles. You might have noticed that the VirtueMart search box is already enabled for us. So we just need to move it to the top right of our site:

  1. Navigate to Extensions | Module Manager. Near the top of the list you will see the VM-Search in Shop module.

  2. Notice in the Position column it is shown as in position-4. This is what we need to change, as shown in the following screenshot:

  3. Click on VM - Search in Shop. You now see the following screenshot:

  4. Click on the Select Position button and choose position-0. This does assume you haven't changed the template from the default one. If you have, it doesn't matter, just look down the Templates column for the search position for your template.

  5. Click on Save when you are done. Check the store front and you should see your product search box neatly positioned.

    Next we will position the Product Categories box. Now at the moment we don't have any product categories but we will in the next chapter. So let's position it on the left ready.

  6. If you are not on the Module Manager screen, then navigate to Extensions | Module Manager from the main Joomla! menu.

  7. Now click on the New button. You will see the Select a module type pop up. Click on VirtueMart Category and you will then be able to fine-tune the module.

  8. Let's name ours Categories. Click on the Select Position button and choose position-4. In the following screenshot it shows what the key parts of the configuration will look like when you are done:

  9. position-4 is the same position that the VM - Search in Shop module was in before we moved it. Click on Save to position your new module. You can't see it yet. But it is there.

Now we want the shopping cart and the Currency Selection box on the right. Notice they are already visible but on the left. The following steps show how to move them over:

  1. Go to the Module Manager page (you know where it is).

  2. First click on VM - Shopping Cart.

  3. Click on the Select Position button and change the position to position-8.

  4. Click on Save. Done! Now do the same for the Currency Selector box.

How it works...

Page layout in Joomla! is done with modules. Modules can be custom-made like the Menu module we created previously or can be predefined but with optional settings like the modules we just positioned.

There's more...

Did you notice that in the main Module Manager page there were a few more modules than those which actually exist on the site pages? Remember the Product Categories module that was seemingly invisible? Well, there are a number of other VirtueMart modules which are already enabled for us that will seemingly spring to life when there is some relevant content to show in them. We will get to that in the next chapter when we look at merchandising your VirtueMart store.

About the Author

Book Title
Access this book, plus 7,500 other titles for FREE
Access now