VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: m2webdesigning on August 30, 2012, 21:03:22 PM

Title: Continue Shopping Link not working properly
Post by: m2webdesigning on August 30, 2012, 21:03:22 PM
Hi,

I have VM2.0.8 installed and the Continue shopping cart link is not working properly because of SEF if we disable the SEF the link works fine, and go to the category page when we click on it. But when enable the SEF the link goes to particularly one manufacturers page from all the pages wherever you click add to cart.

Can anyone help me getting this sorted with SEF enabled.

Thanks,
Snehal
Title: Re: Continue Shopping Link not working properly
Post by: dchristof on September 01, 2012, 17:10:19 PM
I'm posting this here in case it helps anyone:

With Joomla 2.5.6 and Vitruemart 2.0.8e the Continue Shopping link that pops up when you click the Add To Cart button goes to the category page of the product. I wanted it to point to the current page the user was browsing, whether that was the virtuemart frontpage or the product page or a category page. So I edited file

components/com_virtuemart/controllers/cart.php

and changed line 112 from

$continue_link = JRoute::_('index.php?option=com_virtuemart' . $categoryLink);

to

$continue_link = JRoute::_('');

BUT be careful because this is not the best solution since this file might get overwritten after a virtuemart version upgrade. It was the only thing I could do for the time being though..

Title: Re: Continue Shopping Link not working properly
Post by: m2webdesigning on September 12, 2012, 14:37:48 PM
Thanks that worked magic for me.........  :D
Title: Re: Continue Shopping Link not working properly
Post by: furtherdg on September 21, 2012, 20:57:49 PM
Can't you do this as an override so that when updates happen the file does not get overwritten?
Title: Re: Continue Shopping Link not working properly
Post by: m2webdesigning on September 21, 2012, 21:07:05 PM
Hi,

Yes if you are using any template for your virtuemart than this will be done in your template Cart file and as any new update on virtuemart will not override it.

Thanks
Snehal
Title: Re: Continue Shopping Link not working properly
Post by: furtherdg on September 27, 2012, 23:23:06 PM
So would the file structure look like this: mytemplate/html/com_virtuemart/controllers/cart.php

I am having a hard time figuring out the structure as it does not seem to coincide exactly with the actual file structure. For example I have no idea where to put VM language files in my template for overrides or if that is even possible. Any light you can shed on placement would be great.
Title: Re: Continue Shopping Link not working properly
Post by: m2webdesigning on September 28, 2012, 11:07:44 AM
Hi Alex,

The structure you have mentioned is completely correct just override the cart.php file in mytemplate/html/com_virtuemart/controllers/cart.php and that will do for you.

Thanks
Snehal
Title: Re: Continue Shopping Link not working properly
Post by: randomdev on October 30, 2012, 03:30:15 AM
controller overrides didnt seem to work for me like that? Had to replace core files.
Title: Re: Continue Shopping Link not working properly
Post by: ronjb on July 19, 2013, 23:33:58 PM
same here template override didn't work too.. have to override the core