News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

User Activation doesnt work properly

Started by Jybrid, May 26, 2020, 09:26:20 AM

Previous topic - Next topic

Jybrid

Joomla User Option: "Kontenaktivierung durch: Benutzer"

Während dem Checkout, beim senden "Register And Checkout" wird über VM ein Joomla-User angelegt und gleichzeitig die "Activation-Email" an den User verschickt.
Gleichzeitig wird der User automatisch, bereits vor der "Kontoaktivierung" eingeloggt.

Klickt der User aus seiner E-Mail heraus den Activation-Link https://example.com/index.php?option=com_users&task=registration.activate&token=xxxxxxxx&Itemid=435
Es findet keine Joomla-User-Activation statt.

Lösungsvorschlag: User-Activation via VM durchführen

Joomla User Option: "Account activation by: User"

During the checkout, when sending "Register And Checkout" a Joomla user is created via VM and at the same time the "Activation-Email" is sent to the user.
At the same time the user is automatically logged in before the "Account Activation".

If the user clicks the activation link https://example.com/index.php?option=com_users&task=registration.activate&token=xxxxxxxx&Itemid=435 from his e-mail.
There is no Joomla user activation.


Proposed solution: Perform user activation via VM

jenkinhill

Quote
At the same time the user is automatically logged in before the "Account Activation".

So the shopper can get on and complete the purchase instead of farting around waiting for a confirmation email. AFAIK this has always been the default action of VirtueMart and prevents lost sales. I never require email confirmation on any of my sites so have never tested this.
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

Jybrid

That it's a "misfunction", there's no doubt about that?

The following application:
Unknown user performs a checkout and registers on the fly.
The user receives an e-mail with the typical Joomla token.
The user clicks this activation link.

But and this is the fatal thing, the link does not lead to an activation of the user account.

If the user leaves the page (because he is finished with the order) and comes back to this shop page sometime, he cannot log in, because his account has not been activated.

In the end, this means that the user can register but the activation-mail(activation-link) will have no effect.

At the next visit the user has a lot of trouble to log in.
etc. etc.

Das es eine "Fehlfuntkion" ist, darüber besteht kein Zweifel?!

Folgender Anwendungsfall:
Unbekannter Nutzer führt einen Checkout aus und registriert sich on the fly.
Der User bekommt eine E-Mail mit dem typischen Joomla-Token.
Der User klickt diesen Aktivierungslink.

Jedoch und das ist das Fatale, der Link führt zu keiner Aktivierung des User-Accounts.

Verlässt der Nutzer die Seite(weil er mit dem Bestellen fertig ist) und kommt irgendwann wieder auf diese Shop-Seite, kann er sich nicht einloggen, da sein account nicht aktiviert wurde.

Im endeffekt bedeutet dies, der user kann sich zwar registrieren aber die activation-mail(aktivation-link) bleibt wirkungslos.

Bei einem nächsten Besuch hat der User viel Ärger sich einzuloggen.
usw. usw.

GJC Web Design

Yes -- the function is broken and has been as long as I have known Virtuemart.. but the question is why would you want user account activation on an ecommerce site where they can only register thru the checkout work flow?
I manage many VM shop sites and I can't remember an occasion of spam registrations thru the cart  - yes.. it is a huge problem with unprotected ( no captcha) Joomla registrations but I don't see the need for it in VM..

It imho is the perfect way to loose sales...
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

panjarek

How can I set up registration only via check out process? Maybe this is silly question but I really want to know :)

GJC Web Design

Joomla reg is already redirected by the VM system plugin to the VM user pages

In the ( from memory) user edit.php default page  ( in a template over ride) at the  top check if the user has something in their cart .. if not display a message or redirect to a page like

https://www.4wdpartshop.com.au/4wd-registration
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

panjarek

#6
Thanks for advice, this is what I was looking for. I added condition like below to display the form also for logged in users.

$vm_cart = VirtueMartCart::getCart();
if ($vm_cart->_fromCart or $this->cart->getInCheckOut() or $this->userDetails->virtuemart_user_id!=0)

Jybrid

Thank you very much for your answers.

As I said, I want to get the registration.activation working!

Therefore I have written a Joomla System Plugin, which bypasses or solves this error.

The plugin is available for free download at: https://lab.jybrid.com/joomla/vmjybridaccountactivation

The Joomla plugin is independent of Joomla and Virtuemart. So no core hacks or similar nonsense that prevents the Joomla or Virtuemart update.

Hope this helps others as well.

---

Vielen Dank für Eure Antworten.

Wie gesagt, ich möchte die registration.activation funktionsfähig haben!

Dafür habe ich ein Joomla System Plugin geschrieben, welches diesen Fehler umgeht bzw. löst.

Das Plugin steht kostenlos zum Download unter: https://lab.jybrid.com/joomla/vmjybridaccountactivation

Das Joomla Plugin ist von Joomla und Virtuemart unabhängig. Also keine Core-Hacks oder ähnlichem Unsinn der das Joomla oder Virtuemart-Update verhindert.

Hoffe das hilft noch anderen.

Quote from: GJC Web Design on May 26, 2020, 14:10:57 PM
Yes -- the function is broken and has been as long as I have known Virtuemart..