I'm just about to go live with my 1.0.7.5 and have found that 'customers_name' is missing from orders>edit, invoices, packing_slips (including in the batch add-on)
It is, however,> orders on the orders page and in the data base>orders
This may have be a problem with 1.0.7.4 (no orders update for 1.0.7.5) and has been corrected in a later update, if it is I apologise for the question but could someone point me to which version it was corrected on
Thank you
Missing customer name
-
- VIP Member
- Posts: 104
- Joined: Thu Mar 04, 2021 1:18 pm
- Has thanked: 2 times
- Been thanked: 6 times
Re: Missing customer name
Very much still getting problems with this.
My understanding is that the address block is created in admin>classes>order.php where the details for it are selected from the database by this query:
and then the address block is formed like so:
and then transfered to admin>orders.php here:
But I get everything except the 'name'
My understanding is that the address block is created in admin>classes>order.php where the details for it are selected from the database by this query:
Code: Select all
$order_query = tep_db_query("SELECT * FROM orders WHERE orders_id = " . (int)$order_id);
$order = tep_db_fetch_array($order_query);
Code: Select all
$this->customer = [
'id' => $order['customers_id'],
'name' => $order['customers_name'],
'company' => $order['customers_company'],
'street_address' => $order['customers_street_address'],
'suburb' => $order['customers_suburb'],
'city' => $order['customers_city'],
'postcode' => $order['customers_postcode'],
'state' => $order['customers_state'],
'country' => ['title' => $order['customers_country']],
'format_id' => $order['customers_address_format_id'],
'telephone' => $order['customers_telephone'],
'email_address' => $order['customers_email_address'],
];
$this->delivery = [
'name' => trim($order['delivery_name']),
'company' => $order['delivery_company'],
'street_address' => $order['delivery_street_address'],
'suburb' => $order['delivery_suburb'],
'city' => $order['delivery_city'],
'postcode' => $order['delivery_postcode'],
'state' => $order['delivery_state'],
'country' => [ 'title' => $order['delivery_country']],
'format_id' => $order['delivery_address_format_id']];
if (empty($this->delivery['name']) && empty($this->delivery['street_address'])) {
$this->delivery = false;
}
$this->billing = [
'name' => $order['billing_name'],
'company' => $order['billing_company'],
'street_address' => $order['billing_street_address'],
'suburb' => $order['billing_suburb'],
'city' => $order['billing_city'],
'postcode' => $order['billing_postcode'],
'state' => $order['billing_state'],
'country' => ['title' => $order['billing_country']],
'format_id' => $order['billing_address_format_id'],
];
Code: Select all
<tr>
<td>
<p><?php echo $address->format($order->customer, 1, '', '<br>'); ?></p>
<p><?php echo $order->customer['telephone'] . '<br>' . '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></p>
</td>
<td><p><?php echo $address->format($order->delivery, 1, '', '<br>'); ?></p></td>
<td><p><?php echo $address->format($order->billing, 1, '', '<br>'); ?></p></td>
</tr>
Current Store is now running 1.0.7.5 - php 7.3.24
Now working on 1.0.8.19 - php 7.3.24
Now working on 1.0.8.19 - php 7.3.24
-
- VIP Member
- Posts: 1996
- Joined: Mon Oct 07, 2019 4:39 am
- : Buy Me A Beverage
- Has thanked: 26 times
- Been thanked: 175 times
Re: Missing customer name
Sorry I don't know the answer but one of the benefits of being a Pro Supporter is that you can post this question in the VIP PRO Supporters forum where help and support direct from the Core Developers is available.
-
- VIP Member
- Posts: 49
- Joined: Wed Mar 10, 2021 3:02 am
- Has thanked: 1 time
Re: Missing customer name
I had that problem a while back.
INSERT INTO `customers` (`customers_id`, `customers_gender`, `customers_firstname`, `customers_lastname`, `customers_dob`, `customers_email_address`, `customers_default_address_id`, `customers_telephone`, `customers_fax`, `customers_password`, `customers_newsletter`) VALUES
INSERT INTO `address_book` (`address_book_id`, `customers_id`, `entry_gender`, `entry_company`, `entry_firstname`, `entry_lastname`, `entry_street_address`, `entry_suburb`, `entry_postcode`, `entry_city`, `entry_state`, `entry_country_id`, `entry_zone_id`) VALUES
I'm betting that your issue was with a database change to First and Last Name.
Good luck.
INSERT INTO `customers` (`customers_id`, `customers_gender`, `customers_firstname`, `customers_lastname`, `customers_dob`, `customers_email_address`, `customers_default_address_id`, `customers_telephone`, `customers_fax`, `customers_password`, `customers_newsletter`) VALUES
INSERT INTO `address_book` (`address_book_id`, `customers_id`, `entry_gender`, `entry_company`, `entry_firstname`, `entry_lastname`, `entry_street_address`, `entry_suburb`, `entry_postcode`, `entry_city`, `entry_state`, `entry_country_id`, `entry_zone_id`) VALUES
I'm betting that your issue was with a database change to First and Last Name.
Good luck.