News:

Looking for documentation? Take a look on our wiki

Main Menu

SEF Product URL show only the LAST CATEGORY

Started by mrtrung, October 09, 2012, 06:38:28 AM

Previous topic - Next topic

mrtrung

I have a small problem with the urls in VM2. Simply put i need the product url to show only the last category. Please read below for a full explanation.

The reason for the above is i am updating a clients joomla 1.5.26 with virtuemart 1.9 to joomla 2.5 with virtuemart 2 and need the urls to match in order to avoid any 404's. Sounds simple enough but heres the problem, in vm 1.9 they have the sh404sef component managing the urls which uses only the last category for the product url.

For example ..

in vm1.9 with sh404sef the product url looks like /3-Tone-Coloured-Contact-Lenses/Blue-3-Tone-Sapphire-1-Month-Lenses.html
in vm 2 /choose-by-contact-lenses-tone/3-tone-coloured-contact-lenses/blue-3-tone-sapphire-1-month-lenses.html

Why dont i use sh404sef in vm2 i hear you ask. Well the answer is simple sh404sef doesnt support virtuemart 2 and personally im against sh404sef anyway, from experience i only find it slows things down.

So why dont i just use 301 redirects in .htaccess ? I suppose this is always a solution but as above id rather not as rewrites only slow things down and can still affect rankings.

Preferably i'm looking to modify how the product url is created directly in the virtuemart router file but i have no idea how to go about this.

How can i change my product url to show only the last category ?

Thanks