News:

Looking for documentation? Take a look on our wiki

Main Menu

Problems with continue shoping button

Started by BrandMatt, November 25, 2013, 18:40:01 PM

Previous topic - Next topic

BrandMatt

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?

GJC Web Design

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') ;
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

BrandMatt

What file is this code in? And line numbers?

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

BrandMatt


BrandMatt

The file I edited was for the continue shopping button in the pop-up, padded.php. Can you please advise me further.

GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation