Search Engine Friendly (SEF) Urls for Virtuemart

on Tuesday, 14 June 2011.

I've come up with a very simple FREE solution to give your VirtueMart Joomla! 1.5 sites SEF URLs. This is the an example of the format you will achieve:

http://yoursite.com/store-alias/category-name/product-name/unique-id

Install Instructions

  1. Download the router.php file
  2. Place the router.php file into your components/com_virtuemart folder in your joomla installation.
    2. Virtuemart Router Path
  3. Enable Joomla SEF URLs in your Joomla admin under Global Configuration-> Site -> SEO Settings as shown in the image below:
    3. Joomla! SEF Configuration

Features

  • SEF URLS for all important landing pages (products, categories and manufactures)
  • Handles categories and products with the same name
  • Converts / characters to - in URL
  • Handles multiple categories for one product by choosing the category with the highest list order
  • No duplicate URLs

Example

http://pactstore.com.au 

Linking directly to categories, products & manufacturers

If you are linking to a product or category directly. You need to supply the same link that Virtuemart uses throughout its component. The easiest way to do this is to create a new menu item as an external link like the following:

Category: index.php?option=com_virtuemart&page=shop.browse&Itemid=32&category_id=4

Product: index.php?option=com_virtuemart&page=shop.product_details&Itemid=32&product_id=79

Manufacturer: index.php?option=com_virtuemart&page=shop.browse&Itemid=32&manufacturer_id=4

So you will need to change the numbers marked in bold, i.e the Itemid, category_id & product_id to the relevant id's. The Itemid is the menu item id of the Virtuemart component. This can be found by viewing the last column in the menu manager for the relevant menu.

This might seem a bit technical but it's quite easy, and will make a vast difference to your SEO. Also I'll do my best to help if you have any problems.

Known Issues

The sort by Product Name, Price, Latest Products list box doesn't preserve SEF URLs. This is because Virtuemart has not taken SEF into consideration and used javascript to redirect which doesn't allow the router to rewrite the URL. You can hide the listbox in the Virtuemart configuration if need be.

Other 3rd Party Virtuemart SEF Plugins

There are quite a few third party plugins you can use for Virtuemart SEF URLs. I had a look through the methods on this site and found the closest I could get to neat SEF URLs was by using the sh404sef component. It is a very complex component, and takes a lot of tweaking, not the most elegant solution in my opinion.

References

Download

blog comments powered by Disqus