News:

Support the VirtueMart project and become a member

Main Menu

One login to site and Virtuemart

Started by abrodski, October 06, 2016, 14:06:21 PM

Previous topic - Next topic

abrodski

Hello!
I've got Virtuemart 3 and there's a little annoyance with shoppers' login. You see, I register my customers myself first in Joomla's User manager. After that they automatically appear as shoppers in VM.
It's convenient. BUT... The way the site organized is like this:
The visitor first has to login on site's front page (regular Joomla login). Then he goes to VM and puts something into the cart. But what happens sometimes is that when he actually goes to cart itself, the cart appears empty and the shopper's got automatically logged out. So he must re-login and only then he can see in the cart what he put in it before (cart is not empty anymore).
My impression is that it's because a Joomla login is not the same as a Virtuemart login, so the customer must log in twice. Or it's something else? And is there a way to simplify the matter?

GJC Web Design

What you describe is not normal and I have never seen this behaviour
once logged in a session is created and as long as the session is live they stay logged in
in fact in more recent VM's there is a keep alive script running to prevent the session timing out

R u sure your testing with a clean browser etc
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

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

abrodski

Quote from: jenkinhill on October 06, 2016, 15:10:26 PM
Are you using SSL?

Of course! I enabled SSL (TLS 1.2 to be exact) everywhere. All Joomla pages (admin and site) and, naturally, all VM pages too.

abrodski

Quote from: GJC Web Design on October 06, 2016, 15:03:44 PM
What you describe is not normal and I have never seen this behaviour
once logged in a session is created and as long as the session is live they stay logged in
in fact in more recent VM's there is a keep alive script running to prevent the session timing out

R u sure your testing with a clean browser etc
We might be talking about two different things here. I'm not saying that my Joomla session ends or my VM session ends. I'm saying that the former doesn't lead to the latter. It's like VM requires its own login from a shopper and the fact that the same user has already logged in to Joomla AS A JOOMLA USER (as opposed to a VM shopper!) doesn't catch with VM checkout process in its cart.

GJC Web Design

this is simply not true IMHO .. I run many many sites and I have never seen this behaviour

logged in is logged in .. the JUser is a global thing used both by J & VM -- if I add to cart and a JUser is present a cart session assigned to that user is started which is attached to the global session
if u then go to cart and the the product is missing (is the user welcome etc still showing? Have u tried to debug if the JUser is still there?) and it reappears by relogging in then something else is happening.
If this was normal behaviour it would have been reported many times...
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

abrodski

#6
Quote from: GJC Web Design on October 06, 2016, 20:15:45 PM
this is simply not true IMHO .. I run many many sites and I have never seen this behaviour

logged in is logged in .. the JUser is a global thing used both by J & VM -- if I add to cart and a JUser is present a cart session assigned to that user is started which is attached to the global session
if u then go to cart and the the product is missing (is the user welcome etc still showing? Have u tried to debug if the JUser is still there?) and it reappears by relogging in then something else is happening.
If this was normal behaviour it would have been reported many times...

Are you trying to say that I'm lying? Why would I lie? Last thing I need is my shoppers had to think about an extra login after they press "Show cart" link. Just because you haven't seen something, doesn't mean it doesn't exist. Live and learn as they say... Okay let me explain everything in details.

If the shopper for the FIRST TIME comes to the site (i.e., cookies are cleared) and he loggs in into Joomla. Then he can see a new menu item in the site main menu. And that's the VM "entrance" so to speak. Then he puts something into the cart. Then there's a small rectangle windows pops up. He then has two options:
a) To choose "Continue shopping" - and everything is OK in that case;
b.) Press "Show cart" link. If he does that, he does get to the cart. BUT IT IS EMPTY and there's no mentioning of this shopper anywhere inside the cart (like his address etc.) And in the Joomla login screen, it's shown that no one is logged in. And if he re-loggs in, then he sees the cart and the item in it that he had put into it before.

What's even more interesting is that inside Joomla admin panel, I can see that this Joomla user IS LOGGED IN while he's automatically logged out inside Joomla/VM.

I can provide the shop's URL and test shopper's credentials and you can see it yourself in about two seconds.