email address in notification email

Open to all! Ask other shopowners for help.
Post Reply
User avatar
martindavinci
Member
Posts: 38
Joined: Mon Mar 08, 2021 8:33 am
Phoenix Version: 1.1.0.5
Has thanked: 2 times

email address in notification email

Post by martindavinci »

1.0.8.19 - php8.0
I had in version Osc 2.3.4 in the confirmation email to the customer in addition to the billing and delivery address, the customer's phone number and email address. Is there a simple way for me to put it back in the 'notification' email? I just can't get it to work. It would help me a lot.


Join The Code Co-op to get access to your library in the Code Co-op Forum
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: email address in notification email

Post by heatherbell »

martindavinci wrote: Mon Feb 10, 2025 6:16 pm customer's phone number and email address.
Depends on where and how you want to output but they will be output by using:

Code: Select all

$customer->get('telephone')
$customer->get('email_address')
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: email address in notification email

Post by heatherbell »

For example https://github.com/CE-PhoenixCart/Phoen ... hp#L46-L48

Code: Select all

    echo "\n" . MODULE_NOTIFICATIONS_CHECKOUT_TEXT_DELIVERY_ADDRESS . "\n"
       . MODULE_NOTIFICATIONS_CHECKOUT_SEPARATOR . "\n"
       . $customer->make_address_label($order->delivery, 0, '', "\n") . "\n";
changed to:

Code: Select all

    echo "\n" . MODULE_NOTIFICATIONS_CHECKOUT_TEXT_DELIVERY_ADDRESS . "\n"
       . MODULE_NOTIFICATIONS_CHECKOUT_SEPARATOR . "\n"
       . $customer->make_address_label($order->delivery, 0, '', "\n") . "\n"
       . $customer->get('email_address') . "\n";
will output the customer's email address below the delivery address
User avatar
martindavinci
Member
Posts: 38
Joined: Mon Mar 08, 2021 8:33 am
Phoenix Version: 1.1.0.5
Has thanked: 2 times

Re: email address in notification email

Post by martindavinci »

Heatherbell,
thank you so much for your solution! I am going to try it out right away.Thanks!


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply