VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: BrandMatt on November 25, 2013, 18:40:01 PM

Title: Problems with continue shoping button
Post by: BrandMatt on November 25, 2013, 18:40:01 PM
I have done a search here on the forums, but the results provided by the query didn't seem to help.
Firstly, my VirtueMart version is 2.0.24b, my Joomla version is 2.5.16, and my PHP version is 5.2.17.

The issue I'm having is the continue hopping button/link seems to be eratic. First it was working as expected. Once clicked it was bringing a user back to the category of the product they were viewing. All of the sudden, it started directing users to 'http://mysite.com/component/virtuemart/store' or something similar. I fixed this by manually editting the php (i copied the original line and commented it out, just incase), to have a link to my store front. This is not ideal, i prefered it dynamically redie=recting to the category. Now on the checkout page, the continue shopping link just refreshes the page.

My other issue with Virtuemart, is when giving my address at checkout time, the "Tilte" select dropdown is empty. I understand this is a separate issue, but I wasn't sure if I should have made a new post for it.

Any ideas?
Title: Re: Problems with continue shoping button
Post by: GJC Web Design on November 25, 2013, 20:38:14 PM
as you first describe is the correct action

if the cat id is found in the object the link will go back to the cat

if not will return to the VM home page - thats the way its coded

if ($this->product->virtuemart_category_id) {
$catURL =  JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$this->product->virtuemart_category_id, FALSE);
$categoryName = $this->product->category_name ;
} else {
$catURL =  JRoute::_('index.php?option=com_virtuemart');
$categoryName = jText::_('COM_VIRTUEMART_SHOP_HOME') ;
}


if you didn't want that you could change the else back to your root category if cat id isn't known

if ($this->product->virtuemart_category_id) {
$catURL =  JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$this->product->virtuemart_category_id, FALSE);
$categoryName = $this->product->category_name ;
} else {
$catURL = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=0', FALSE);
$categoryName = jText::_('COM_VIRTUEMART_SHOP_HOME') ;
}
Title: Re: Problems with continue shoping button
Post by: BrandMatt on November 26, 2013, 16:55:56 PM
What file is this code in? And line numbers?
Title: Re: Problems with continue shoping button
Post by: GJC Web Design on November 26, 2013, 17:00:07 PM
the default productdetails template
Title: Re: Problems with continue shoping button
Post by: BrandMatt on November 26, 2013, 18:35:04 PM
Which file specifically?
Title: Re: Problems with continue shoping button
Post by: BrandMatt on November 27, 2013, 21:01:52 PM
The file I edited was for the continue shopping button in the pop-up, padded.php. Can you please advise me further.
Title: Re: Problems with continue shoping button
Post by: GJC Web Design on November 27, 2013, 21:51:32 PM
If you mean for the popup afaik the continue_link comes from the cart view.html.php or I assume the view.json.php

function prepareContinueLink()

components/com_virtuemart/views/cart/view.html.php  etc

it gets it catid from the helper shopFunctionsF  function getLastVisitedCategoryId() which gets it from the session

if the func can't find a catid then the link is index.php?option=com_virtuemart&view=category which is basically the top level cat 0