Wrong Name & Email address

Open to all! Ask other shopowners for help.
AsTecModels
Member
Posts: 99
Joined: Wed Mar 18, 2026 6:20 pm
Phoenix Version: v1.1.0.6
Has thanked: 6 times
Been thanked: 3 times

Wrong Name & Email address

Post by AsTecModels »

Hi All,

I have done something wrong, in messages sent out and order confirmations instead of who they are to it is putting my store email and store owner name.

Example below shows Customer Name as Administrator but should show Jonathan, and Customer Email as Enquires@AsTecModels.Co.Uk but should be shop@nimrifrc.co.uk
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Wrong Name & Email address

Post by burt »

That seems strange. Have you made `customised changes` to the checkout notification ?

Post the code from /includes/modules/notifications/templates/tpl_n_checkout.php
Or any override of it.
I am not here to build for you.
I am here to build with you. Let's help each other.
AsTecModels
Member
Posts: 99
Joined: Wed Mar 18, 2026 6:20 pm
Phoenix Version: v1.1.0.6
Has thanked: 6 times
Been thanked: 3 times

Re: Wrong Name & Email address

Post by AsTecModels »

burt wrote: Wed Apr 15, 2026 8:56 am That seems strange. Have you made `customised changes` to the checkout notification ?

Post the code from /includes/modules/notifications/templates/tpl_n_checkout.php
Or any override of it.
It is everything, the checkout is just one example.

Here is the code you asked about.

Code: Select all

<?php
/*
  $Id$

  CE Phoenix, E-Commerce made Easy
  https://phoenixcart.org

  Copyright (c) 2021 Phoenix Cart

  Released under the GNU General Public License
*/

// let's start with the email confirmation
  echo STORE_NAME . "\n"
     . MODULE_NOTIFICATIONS_CHECKOUT_SEPARATOR . "\n"
     . MODULE_NOTIFICATIONS_CHECKOUT_TEXT_ORDER_NUMBER . ' ' . $order->get_id() . "\n"
     . MODULE_NOTIFICATIONS_CHECKOUT_TEXT_INVOICE_URL . ' '
     . $GLOBALS['Linker']->build('account_history_info.php', ['order_id' => $order->get_id()], false) . "\n"
     . MODULE_NOTIFICATIONS_CHECKOUT_TEXT_DATE_ORDERED . ' ' . $GLOBALS['long_date_formatter']->format(time()) . "\n\n";

  if (!empty($order->info['comments'])) {
    echo htmlspecialchars($order->info['comments']) . "\n";
  }

  echo MODULE_NOTIFICATIONS_CHECKOUT_TEXT_PRODUCTS . "\n"
     . MODULE_NOTIFICATIONS_CHECKOUT_SEPARATOR . "\n";
  foreach ($order->products as $product) {
    echo "\n" . $product['qty']
       . ' x ' . $product['name']
       . (empty($product['model']) ? '' : ' (' . $product['model'] . ')')
       . ' = ' . $GLOBALS['currencies']->display_price($product['final_price'], $product['tax'], $product['qty']);

//------insert customer chosen options to order--------
    foreach (($product['attributes'] ?? []) as $attribute) {
      echo "\n\t" . $attribute['option'] . ' ' . $attribute['value'];
    }
//------insert customer chosen options eof ----
  }
  echo "\n" . MODULE_NOTIFICATIONS_CHECKOUT_SEPARATOR . "\n";

  foreach ($order->totals as $order_total) {
    echo strip_tags($order_total['title']) . ' ' . strip_tags($order_total['text']) . "\n";
  }

  if ($order->content_type != 'virtual') {
    echo "\n" . MODULE_NOTIFICATIONS_CHECKOUT_TEXT_DELIVERY_ADDRESS . "\n"
       . MODULE_NOTIFICATIONS_CHECKOUT_SEPARATOR . "\n"
       . $customer->make_address_label($order->delivery, 0, '', "\n") . "\n";
  }

  echo "\n" . MODULE_NOTIFICATIONS_CHECKOUT_TEXT_BILLING_ADDRESS . "\n"
     . MODULE_NOTIFICATIONS_CHECKOUT_SEPARATOR . "\n"
     . $customer->make_address_label($order->billing, 0, '', "\n") . "\n\n";

  $payment = $GLOBALS[$_SESSION['payment']];
  if (is_object($payment)) {
    echo MODULE_NOTIFICATIONS_CHECKOUT_TEXT_PAYMENT_METHOD . "\n"
       . MODULE_NOTIFICATIONS_CHECKOUT_SEPARATOR . "\n";
    echo $order->info['payment_method'] . "\n\n";
    if (isset($payment->email_footer)) {
      echo $payment->email_footer . "\n\n";
    }
  }
?>
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Wrong Name & Email address

Post by burt »

Strange then, as that email comes from that Notification.

Search your files for "Customer Name:" and see where it appears.
You must have made a change to code somewhere?
I am not here to build for you.
I am here to build with you. Let's help each other.
Dan Cole
Senior Contributor
Posts: 498
Joined: Fri Oct 25, 2019 2:14 pm
Phoenix Version: 1.0.8.21
Has thanked: 67 times
Been thanked: 61 times

Re: Wrong Name & Email address

Post by Dan Cole »

Could in be a database issue where the customer_id is mixed up?

Dan
AsTecModels
Member
Posts: 99
Joined: Wed Mar 18, 2026 6:20 pm
Phoenix Version: v1.1.0.6
Has thanked: 6 times
Been thanked: 3 times

Re: Wrong Name & Email address

Post by AsTecModels »

Dan Cole wrote: Wed Apr 15, 2026 10:45 am Could in be a database issue where the customer_id is mixed up?

Dan
Hi Dan,
It would be every account wrong in the database, but they all look right. If I change the Config->My Store->Store Owner or E-Mail Address they change the customer and email address no matter who is being emailed.
User avatar
burt
Core Team
Posts: 4546
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Wrong Name & Email address

Post by burt »

burt wrote: Wed Apr 15, 2026 10:23 am Search your files for "Customer Name:" and see where it appears.
This is the first step.
I am not here to build for you.
I am here to build with you. Let's help each other.
Dan Cole
Senior Contributor
Posts: 498
Joined: Fri Oct 25, 2019 2:14 pm
Phoenix Version: 1.0.8.21
Has thanked: 67 times
Been thanked: 61 times

Re: Wrong Name & Email address

Post by Dan Cole »

You're best to follow @burt's advise. I'm just guessing, but if it is just the email address and name that are incorrect, could it be related to the change you referenced here?

viewtopic.php?p=22589#p22589

Dan
AsTecModels
Member
Posts: 99
Joined: Wed Mar 18, 2026 6:20 pm
Phoenix Version: v1.1.0.6
Has thanked: 6 times
Been thanked: 3 times

Re: Wrong Name & Email address

Post by AsTecModels »

Dan Cole wrote: Wed Apr 15, 2026 4:42 pm You're best to follow @burt's advise. I'm just guessing, but if it is just the email address and name that are incorrect, could it be related to the change you referenced here?

viewtopic.php?p=22589#p22589

Dan
Good spot, that is it. Without it is correct but contact us does not give sender user name and email. I will go and play with it.
AsTecModels
Member
Posts: 99
Joined: Wed Mar 18, 2026 6:20 pm
Phoenix Version: v1.1.0.6
Has thanked: 6 times
Been thanked: 3 times

Re: Wrong Name & Email address

Post by AsTecModels »

Dan Cole wrote: Wed Apr 15, 2026 4:42 pm could it be related to the change you referenced here?

viewtopic.php?p=22589#p22589
I have modified that file and now works :D thank you for noticing where the issue was.


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