|
Audience level : JoomJock 
This tutorial was contributed by Bernhard Esterhyze, of www.WoozaShop.co.za, which you can visit for more information or to buy an online e-commerce shop.
The tutorial covers some basic information about installing and configuring your Virtuemart store and will be especially useful for developers.
Virtuemart ABC
Virtuemart is a free e-commerce system developed for Joomla. It is written in php and makes use of a mySQL database. The latest version released is VirtueMart 1.0.13a stable, and this is compatible with Joomla 1.0.13.
Installation
Setting up Virtuemart is very simple. You can download it for http://www.virtuemart.com/ and install the component in the Joomla installer. The package comes bundled with various modules, like latest products, random products, shopping cart etc, but the main module you need to install for the system to work is mod_virtuemart. This module gives you a listing of the categories, a search function (you need to install the search mambot to use it), and a mini shopping cart.
Install sample data
When installing Virtuemart for the first time it is a good idea it install the sample data. This will give you some sample products in your shop to help you figure out how the shop works. From that point onwards you simply upload your products and you're set.
Customise shop with different browse and product_details templates
A good way to customise your shop is to make use of the different browse and product_details templates. These can be set in the individual category setup sections. There are 5 different browse and 4 different product_details templates included in the package. They are stored in <Joomla_root>\administrator\components\com_virtuemart\html\templates. Play around with them and see what works the best with your shop. You can also create you own templates by customising one of the existing templates.
Set correct checkout method
Make sure to set your site to the most appropriate checkout method. This can be set under admin - configuration - checkout. There are 4 options, each with different steps. It is important to set this according to the products you sell. For example if you sell downloadable products it is not necessary to include the shopper's address.
Add-to-cart button
The add-to-cart button can be customized by creating your own add-to-cart graphic (in gif format, named add-to-cart-xxx.gif) and uploading it to <Joomla_root>\ components\com_virtuemart\shop_image\ps_image. In the admin section you can then set it under admin - configuration - site - layout.
Payment method - Credit Card
One of the most complex setups to do is setting up a payment gateway to receive credit card payments. In South Africa we cannot receive Paypal payments (only make payments). This makes it much more complicated to receive online credit card payments.
There are a number of payment gateway providers in SA, some requiring you to have a merchant account and some who act as merchants themselves, thus not requiring you to have a merchant account (for this service they charge a small premium).
The easiest way to set this up is to obtain the gateway integration documentation from your chosen gateway provider. Be sure to get the documentation for the setup where transactions take place on the gateway provider's secure site, and not the system where you make use of your own SSL security - this setup is much more complicated.
You then add a new payment method. Set the method to active, and give it an appropriate name and code (any you choose will do). Under payment class name add ps_payment. Set payment method type to Paypal (or related). In the configuration section, enter the data provided by the gateway provider. Here you might need variables generated by the shop, like reference number, order amount, and email.
Below is a suggested method of obtaining these values, copy the code into the configuration "Payment extra info" section:
$AMOUNT=$db->f("order_total");
$REFERENCE=$db->f("order_id");
$PRODUCTDESC = 'Netmix Products';
$EMAIL = $user->email;
You can then use these variables to post to the gateway supplier's site.
If you have any trouble setting it up, you can contact the gateway supplier.
Latest and Feature Products Modules
A common request is to have the latest products or featured products displayed on the homepage. Publishing these modules in standard module positions will result in them being displayed during the entire checkout process. To prevent this, you can make use of the following technique.
Create a module position called latest (or featured). Publish the Latest Products module in the module position "latest" (the one you just created). In you homepage content article (or any other place you would like to Latest Products to be displayed, you add to the content. This loads the module into that specific position, and ensures that the module is shown only when you want it to show. Just make sure your CSS is correct to get the correct display.
Transferring your site from a localhost to remote server
As a final thought remember to change the secure url to your domain name. When you install Virtuemart on a local server, it automatically sets the secure url to your current domain. When you then move the site to a remote server later, you have to update the secure url, otherwise the site will be redirected back to your local host in the checkout section of the shop.
|