VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: bohemier on March 26, 2012, 20:24:43 PM

Title: Cart functions redirect URLs end up being converted to &amp ;
Post by: bohemier on March 26, 2012, 20:24:43 PM
Hello,

in VM2.0.3G, when using cart functions like Update and Delete, we get redirected to our same page, but extra parameters like &Itemid=20 get converted to &Itemid=20 in the URL, so we end up loosing them. To fix this, we need to tell JRoute class to not convert the url into XHTML compliant code i.e. add a second parameter (false) to JRoute::_ . For example line 352 of components/com_virtuemart/controllers/cart.php

change this
$mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart'));


to this
$mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart', false));

This, of course breaks XHTML compliance... any one has a better idea?

using Joomla 1.5.25, php 5.2.17
Title: Re: Cart functions redirect URLs end up being converted to &amp ;
Post by: Imron on April 17, 2012, 21:41:44 PM
Thank you!!!!  I had been looking for a solution to this for 2 days.