customer email change - not work

Phoca Cart - complex e-commerce extension
p.luks
Phoca Member
Phoca Member
Posts: 48
Joined: 19 Jan 2020, 20:51

customer email change - not work

Post by p.luks »

Hello,

i continue testing with Phoca Cart and have noticed a problem.

I have created a test customer with the email address tester1@example.com.

After the first test order I logged in with the user and changed the email address in the frontend. The change is also applied and displayed correctly in the checkout.

However, when completing the order, the mail is sent to the old mail address. In the backend under the order data, the old mail address has also remained. But in the backend under the customers, is the new mail address.

It looks as if the new mail address is not completely taken over.

[German]
Hallo,

Ich teste mit Phoca Cart weiter und habe ein Problem festgestellt.

Ich habe einen Testkunden mit der Email-Adresse tester1@example.com angelegt.

Nach der ersten Testbestellung habe ich mich mit dem Benutzer eingeloggt und die Emailadresse im Frontend geändert. Die Änderung wird auch übernommen und in der Kaufabwicklung korrekt angezeigt.

Beim Abschließen der Bestellung wird die Mail jedoch an die alte Mailadresse gesendet. Auch im Backend unter den Bestelldaten ist die alte Mailadresse geblieben. Aber im Backend unter den Kunden steht die neue Mailadresse.

Es sieht so aus, als ob die neue Mailadresse nicht vollständig übernommen wird.

customer profile
Image

customer profile edit
Image

checkout with new email
Image

email to customer old mail-address
Image

order in backend with old mail-address
Image

Tags:
christine
Phoca Hero
Phoca Hero
Posts: 2819
Joined: 28 Nov 2010, 17:20

Re: customer email change - not work

Post by christine »

Hallo Peer :-)

maybe you have to change (store) to new mail-address in backend also? See your last screenshot.
Glaube ich halt.

Liebe Grüße
Christine
p.luks
Phoca Member
Phoca Member
Posts: 48
Joined: 19 Jan 2020, 20:51

Re: customer email change - not work

Post by p.luks »

Hello Christine ;)

i don't think so. In the account under customers the correct email address is displayed. The field is also disabled there for editing.

Under the Joomla users I can change the field in the backend, but also here the new email address is entered.

customers in the backend
Image
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: customer email change - not work

Post by Jan »

Hi, email is managed by Joomla! user managment, becasue Joomla! manages users. But it can be different for different orders.

If you set e.g. that the email form field will be not readonly:

Image

Then users can change email for specific order.

BTW - I will take a look at new value for this parameter so the email can be then changed in administration but not in frontend

Now, if you set "No", it can be changed in checkout and in administration:

Image

But maybe the variant: Not possible to change in frontend but possible to change in orders - in administration should be even be possible.

Jan
If you find Phoca extensions useful, please support the project
p.luks
Phoca Member
Phoca Member
Posts: 48
Joined: 19 Jan 2020, 20:51

Re: customer email change - not work

Post by p.luks »

I tried today with the second test user and the same result:
1. login in the frontend with the user account.
2. change the mail address in the profile (menu item phoca_cart > Account).
3. order executed
4. in checkout the new mail address is shown
5. e-mail was sent to the old mail address and not to the new mail address

Then checked in the backend and the new mail address is displayed to the customer - only in the order is the old mail address.

Yesterday I had this with the first test user and changed the mail address. With these settings I have executed a new order today and the mail was sent to the new mail address.

Just tried again:
Logged in as "test user2" in the frontend and changed mail address in the profile. In the backend as admin checked the profile in joomla-users and customers, in both the new mail address is displayed. In the frontend as test user2 logged out and logged in again. Item added to cart in checkout new mail address is displayed. Everything OK and order triggered. In the backend looked at the order and under billing address is the old mail address. Email was sent to the old mail address.

Somewhere it still has the old mail address in the background for the order.
I will check further - maybe I will find out what the problem is.
p.luks
Phoca Member
Phoca Member
Posts: 48
Joined: 19 Jan 2020, 20:51

Re: customer email change - not work

Post by p.luks »

I think I have found the problem. :)

When the user changes his mail address in the profile, the new mail address is shown in all fields. The new mail address is visible in the frontend and backend. Also in the billing data.

But in the table "#__phocacart_users" the old mail address is still there. Only when the user explicitly clicks on Save again in the invoice data, the mail address is changed here.

This is a bit confusing, because the data is displayed correctly and there is no reason for an additional saving.

With a user plugin you can detect the change in the profile and then pass this change to the DB table.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: customer email change - not work

Post by Jan »

Hi,
Only when the user explicitly clicks on Save again in the invoice data, the mail address is changed here.
What exactly do you mean with "save again invoice data"? Do you mean the save button for address in checkout?

So when user will not save this in checkout, maybe instead of using some user plugin while profile email is changed, some check should be done directly in checkout (comparing the emails). To avoid implementing and activating additional user plugin.

Such checkout checking will not change old order emails which need to be changed manually in orders (mostly with old orders, there is no need to make changes)

Image

But hard to say, because the email can even be set for specific order, so maybe the way to do the check in checkout will be not easy (how to detect that the email is obsolete or the email is set by user for specific order). So yes, maybe some user plugin should be done.
Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: customer email change - not work

Post by Jan »

UPDATE

Try to test this beta version of user plugin:
https://github.com/PhocaCz/PhocaCartUse ... v3.0.0.zip

Image

When user or administrator changes the email in user profile, then it can be changed in:

- billing address email field
- shipping address email field

but also in all orders made by current users. Depends on options.

Please try to test and let me know if this solves problems described in this topic.

Thank you, Jan
If you find Phoca extensions useful, please support the project
p.luks
Phoca Member
Phoca Member
Posts: 48
Joined: 19 Jan 2020, 20:51

Re: customer email change - not work

Post by p.luks »

Hello Jan,

I have created a video where I can better show the problem or my concern. Maybe it will be a little better.
I do not want to put it publicly for now, so I send you the link via PN.
p.luks
Phoca Member
Phoca Member
Posts: 48
Joined: 19 Jan 2020, 20:51

Re: customer email change - not work

Post by p.luks »

Oh ok :) - I will test the plugin
Post Reply