Author Topic: Rewrite URL using SKU?  (Read 4530 times)


  • Beginner
  • *
  • Posts: 16
Rewrite URL using SKU?
« on: May 19, 2008, 03:28:01 am »
I am running Artio JoomSEF 3.0.2 version and the 1.1 VM Extension and Joomla 1.53 and VM 1.1... on a php 5 server....

Does anyone know of a way to have the url's rewritten using the SKU data from Virtuemart rather than product name and/or category.

ie. say I have a product named Red Apple in the Fruit category with a SKU of 12345

Right now in most of the SEO extensions they would rewrite it to something similiar to:

Basically taking the product name and category info, taking out the spaces, adding a "-", throwing .html and that is the URL.

I would like it to be instead: or perhaps
so... instead of the product name and/or category do it with the SKU
ie... domain/sku  or domain/category/sku (then add .html)

anyway to do that? It would seem it wouldnt be too tough as instead of getting and applying the product_name data from the VM database... just use product_sku.... I dont know enough on php to do it myself..

This would make a much more stable URL in terms of maintaining product data consistancy as I dont have to worry about a mispelled product name on an inventory update nor a change of category, etc.... also - I could easily do my own sitemap or create an easy app and use cron because I know what the url is without doing a bunch of editing.... I can just take the url slap on the sku, add html and off I go - rather than take the product name, add a dash... then add a 2 if the product has a similar name, etc...

If someone can let me know what edits I need to do to htaccess or Artio Joom SEF for VM 1.1 / Joomla 1.53 - both are current/stable versions it would help out greatly.