Add Shipping Address issue with SH404sef Virtuemart

When combining virtuemart, joomla and SH404sef you tend to get a pretty good combination. The problem lies however with the flatterned urls in virtuemart. Joomla 1.5 has native support as most of you reading this would know however it does not handle many third party components to well. Virtuemart being a great example of this. In turn you are left with a large list of options. One of these being SH404sef and like any third party application it has its issues. This includes the way it handles some of the Virtuemart urls like the “Add Shipping Address” link in the account maintenance or even in the checkout sections of the Joomla / Virtuemart combination.

I know that if you were like me you would have spent quite a bit of time looking for a solution. You are a little better off though as there was no real solution that WORKED?!?!?!? I was reading through a forum thread discussing how SH404sef works with Virtuemart. It made mention of the com_virtuemart.php file in the sef_ext folder within the com_sh404sef folder component folder. So I read through this file and figured out a solution which would prevent users from getting thrown back to the home page when clicking on the “Add Shipping Address” link. I have attached the code below. Insert the following code towards the bottom of the com_virtuemart.php file and you should be good to go.

//Nultz Address Addition
case 'account.shipto':
if ($sefConfig->shVmInsertShopName) $title[] = $shShopName;
if ($shVmCChk)
$title[] = 'vmchk';
$title[] = "shipping-address-maintenance";
break;
//End of Nultz Address Addition

If you are wanting to save some time by cheating I have attached a copy of the http://nultz.com/uploads/com_virtuemart.txt in txt format. Upload the file to the /components/com_sh404sef/sef_ext folder and your issue will be solved.