Author Topic: problem with routing to cart  (Read 2212 times)

D_L_I

  • Beginner
  • *
  • Posts: 22
problem with routing to cart
« 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?

roojai

  • Beginner
  • *
  • Posts: 12
Re: problem with routing to cart
« Reply #1 on: March 15, 2015, 09:56:30 am »
Same problem. Anybody got ideas on this?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10688
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: problem with routing to cart
« Reply #2 on: March 15, 2015, 10:40:08 am »
vm3.0.6.2 is the latest
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4675
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: problem with routing to cart
« Reply #3 on: March 16, 2015, 14:18:23 pm »
The latest vm have the bug, but not the old !
Last releases
Code: [Select]
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

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





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

Completly wrong code in new release.
Code: [Select]
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

  • Beginner
  • *
  • Posts: 22
Re: problem with routing to cart
« Reply #4 on: March 16, 2015, 14:42:41 pm »
@Studio 42 what is the file you are referring to?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4675
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: problem with routing to cart
« Reply #5 on: March 16, 2015, 17:25:46 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

  • Beginner
  • *
  • Posts: 29
Re: problem with routing to cart
« Reply #6 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).