News:

Support the VirtueMart project and become a member

Main Menu

problem with routing to cart

Started by D_L_I, February 05, 2015, 16:56:29 PM

Previous topic - Next topic

D_L_I

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?

roojai

Same problem. Anybody got ideas on this?

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

Studio 42

#3
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

D_L_I

@Studio 42 what is the file you are referring to?

Studio 42

#5
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

bart198x

#6
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).