VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: D_L_I on February 05, 2015, 16:56:29 PM

Title: problem with routing to cart
Post by: D_L_I on February 05, 2015, 16:56:29 PM
Hi guys,
I have a weird issue with the routing to my cart.
I am running vm 3.0.2 on joomla 3.3.6
I created a menu item to show the cart, I would expect than when I am adding a product to the cart I would be redirected to: www.example.com/[cart-menu-alias].
In actual effect and being redirected to: www.example.com/[category-page-alias]/cart.
It seems that the system is disregarding the fact that I have a menu item associated to the cart view.
I checked it with SEO mode enabled and disabled and I am still could not figure out why is is behaving that way.
Any idaes?
Title: Re: problem with routing to cart
Post by: roojai on March 15, 2015, 09:56:30 AM
Same problem. Anybody got ideas on this?
Title: Re: problem with routing to cart
Post by: GJC Web Design on March 15, 2015, 10:40:08 AM
vm3.0.6.2 is the latest
Title: Re: problem with routing to cart
Post by: Studio 42 on March 16, 2015, 14:18:23 PM
The latest vm have the bug, but not the old !
Last releases
case 'cart';
if(!isset($query['Itemid'])){
if ( isset($jmenu['cart']) ) {
$query['Itemid'] = $jmenu['cart'];
} else if ( isset($jmenu['virtuemart']) ) {
$query['Itemid'] = $jmenu['virtuemart'];
}
}


code in old releases

if ( isset($jmenu['cart']) ) $query['Itemid'] = $jmenu['cart'];
else {





$segments[] = $helper->lang('cart') ;
$query['Itemid'] = $jmenu['virtuemart'];
}


Completly wrong code in new release.
if(!isset($query['Itemid'])){

The itemid is always set in joomla(exept in home page or a bug in the code) this mean you can never switch to cart menu fron another view.
Thanks to revert to old code, this work so for 2 years without any problems
Title: Re: problem with routing to cart
Post by: D_L_I on March 16, 2015, 14:42:41 PM
@Studio 42 what is the file you are referring to?
Title: Re: problem with routing to cart
Post by: Studio 42 on March 16, 2015, 17:25:46 PM
Quote from: D_L_I on March 16, 2015, 14:42:41 PM
@Studio 42 what is the file you are referring to?
this file :
YOURSITE\components\com_virtuemart\router.php
line 249 in vm 3.0.6.2
Title: Re: problem with routing to cart
Post by: bart198x on April 08, 2015, 17:59:23 PM
I think that was that file.
I check both cases and realy the old way was better as far You don't need 'continue shopping' in the cart itself.
When The 'continue shopping' is added to the cart it generates another router problem.
In my opinion (subjective feelings) the OLD WAY was better, if someone click continue shopping on popup - he was back to  category, if he go to the cart (from module for egsample) he always can push back button and the sef is still ok, as regards of its look. I was confused when 1. I saw page/category/cart despite of having cart asigned to menu item 2. Coulden't get rid of that 'cart' in address, because site is not in english language (with old code that 'cart' appears too but... better that then nothing, sef though choosed menu item so address looks like http ://site/koszyk/cart).

And that's the way how I use it, I throw out the 'continue shopping' from the cart and use code that was erlier (annoying- but... nicer?, in my opinion of course).