Author Topic: Login redirects to profile instead of cart  (Read 4819 times)

kratzi

  • Jr. Member
  • **
  • Posts: 162
Login redirects to profile instead of cart
« on: February 02, 2016, 00:59:46 am »
I am running a testversion on J 3.4.8 and VM 3.0.12.
When a customer is already a registered user and goes to checkout and wants to login he is not redirected to the checkout process but to his profile. This is actually confusing as the customer wants to checkout and not go to his profile. Also in my earlier version J 2.5.28 and VM 2.6.14 the customer is redirected to the cart as it should be.

Is this  wanted and how can I solve this.???

Thank you

kratzi

kratzi

  • Jr. Member
  • **
  • Posts: 162
Re: Login redirects to profile instead of cart
« Reply #1 on: February 03, 2016, 12:16:59 pm »
I have yesterday installed a fresh version of VM 2.6.14 and J.2.5.28 and the login feature works good.
This means that there were some changes which however are not customer friendly at all. It does not make any sence why a customer who wants to checkout and is already a customer is redirected to login instead of the cart.

Why is this working in the old VM but not in the new VM 3 any more.


jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28336
  • Always on vacation
    • Jenkin Hill Internet
Re: Login redirects to profile instead of cart
« Reply #2 on: February 03, 2016, 13:12:58 pm »
When a customer is already a registered user and goes to checkout and wants to login he is not redirected to the checkout process but to his profile.

That is not the default action in VM3 - it is still the same as in VM2, if all the shopper fields are filled already then the address details are displayed in the cart and the shopper continues to checkout.

Are you using the default VM templates?
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart  4.0.2 10661 on Joomla 3.10.9 PHP 7.4.29

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 10575
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.8.8
Re: Login redirects to profile instead of cart
« Reply #3 on: February 03, 2016, 13:40:38 pm »
on a clean install standard protostar template the login from the cart page login form works perfectly..

you stay on the cart page

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

kratzi

  • Jr. Member
  • **
  • Posts: 162
Re: Login redirects to profile instead of cart
« Reply #4 on: February 03, 2016, 16:02:36 pm »
Ok I have a clean installation of J 2.5.28 & VM 2.6.14 and J 3.4.8 & VM 3.0.12. In both versions I even do not have installed another template than the original ones.

In both versions when I have a new customer and he goes to checkout and enters data for registration including username and password everything is perfect.
The user finishes the shopping and logs out. But now when the same customer (who is already registered from before) puts products into the cart and clicks on checkout he is redirected to the page where he can either register again or login. When the customer now logs in with username and password he is redirected back to cart in  2.5.28 & VM 2.6.14 but to profile page in J 3.4.8 & VM 3.0.12.

At the moment I only have the installations on my localhost but in case you can not reproduce this I will surely install both versions on a public webspace.

Regards

Kratzi



Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3887
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Login redirects to profile instead of cart
« Reply #5 on: February 03, 2016, 16:13:22 pm »
Hello

i am not sure if this is the solution. But you could always try. I use the slick vm login module for my login and I expetrienced exactly the same thing. When in checkout I was redirected to the account page. I saw that this was the setting for slick login after login. I changed this to checkout and i now have what i want. Check you login module, maybe you have the same issue.

regards

Jörgen @ kreativ fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28336
  • Always on vacation
    • Jenkin Hill Internet
Re: Login redirects to profile instead of cart
« Reply #6 on: February 03, 2016, 16:34:17 pm »
Which leads to the question. Are you using ther Joomla login module instead of VM login? If so then set  Login Redirection Page in module config to Cart - I assume you have a menu link to the cart?

But best is never to use Joomla's mod_login.
 
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart  4.0.2 10661 on Joomla 3.10.9 PHP 7.4.29

Spiros Petrakis

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 103
    • yourgeek.gr
  • VirtueMart Version: Always latest Stable
Re: Login redirects to profile instead of cart
« Reply #7 on: February 04, 2016, 11:17:13 am »
Hi kratzi,

this is fixed for the upcoming vm version, open the user/tmpl/edit_address.php file (or your template override for this file) and replace

Code: [Select]
$url = JRoute::_ ('index.php?option=com_virtuemart&view='.$rview.$task, $this->useXHTML, $this->useSSL);

with

Code: [Select]
$url = 'index.php?option=com_virtuemart&view='.$rview.$task;

Joomla templates and extensions development
https://www.yourgeek.gr

kratzi

  • Jr. Member
  • **
  • Posts: 162
Re: Login redirects to profile instead of cart
« Reply #8 on: February 05, 2016, 22:34:56 pm »
Thank you Spyros,

This was the solution. It works awesome. You are my hero :D

Spiros Petrakis

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 103
    • yourgeek.gr
  • VirtueMart Version: Always latest Stable
Re: Login redirects to profile instead of cart
« Reply #9 on: February 06, 2016, 09:53:36 am »
Hi Kratzi,

good to know that the fix works for you also, all credit should go to Valérie Isaksen that provided the actual fix.

Afaik a new version will be available soon (3.0.13 or 3.0.14 probably) that will include this fix also.
Joomla templates and extensions development
https://www.yourgeek.gr