Hi,
The "continue" button should open the category page from where we come from, even if it is the top level category.
--- com_virtuemart/controllers/cart.orig.php 2012-07-05 16:29:54.515752189 +0200
+++ com_virtuemart/controllers/cart.php 2012-07-05 16:30:07.140235453 +0200
@@ -105,11 +105,7 @@
if ($cart) {
// Get a continue link */
$virtuemart_category_id = shopFunctionsF::getLastVisitedCategoryId();
- if ($virtuemart_category_id) {
- $categoryLink = '&view=category&virtuemart_category_id=' . $virtuemart_category_id;
- } else
- $categoryLink = '';
- $continue_link = JRoute::_('index.php?option=com_virtuemart' . $categoryLink);
+ $continue_link = JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $virtuemart_category_id);
$virtuemart_product_ids = JRequest::getVar('virtuemart_product_id', array(), 'default', 'array');
$errorMsg = JText::_('COM_VIRTUEMART_CART_PRODUCT_ADDED');
if ($cart->add($virtuemart_product_ids, $errorMsg )) {
? the link is doing this already,
What you did is just removing the case, when there isnt any last visited category.
Yes but you doesn't support the case when the last visited category is top level category. The ID of top level category is 0, so the result of "shopFunctionsF::getLastVisitedCategoryId()" is the same when there is no last visited category and when the last visited category is top level category.
The id of the toplevel category is 0?
No category should have the id 0. 0 is just the root. That means when you choose the category id 0 in the category view, you get all top level categories. But okey, I can rewrite the function so, that the 0 is also used then.
Thank you.
Hi,
This issue doesn't seem to be solved in VirtueMart 2.0.10.
Thank you.