还打开控制器类admin/controller/sale/order.php
并检查填充 和 的相关部分$order['payment_address']
并$order['shipping_address']
注释掉适当的行(省被添加到字符串/数组的位置)。
同样的事情也应该在前端完成 - catalog/controller/account/order.php
.
应该是这样的:
$find = array(
'{firstname}',
'{lastname}',
'{company}',
'{address_1}',
'{address_2}',
'{city}',
'{postcode}',
//'{zone}',
//'{zone_code}',
'{country}'
);
$replace = array(
'firstname' => $order_info['payment_firstname'],
'lastname' => $order_info['payment_lastname'],
'company' => $order_info['payment_company'],
'address_1' => $order_info['payment_address_1'],
'address_2' => $order_info['payment_address_2'],
'city' => $order_info['payment_city'],
'postcode' => $order_info['payment_postcode'],
//'zone' => $order_info['payment_zone'],
//'zone_code' => $order_info['payment_zone_code'],
'country' => $order_info['payment_country']
);
您可能还必须将格式行从
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}';
到(见/*
和*/
评论):
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' /*. "\n" . '{zone}'*/ . "\n" . '{country}';
到评论:
现在我不确定,地址格式有可能在创建后存储在订单中。在这种情况下,将控制器中的相应行更改为:
/*if ($order_info['payment_address_format']) { // <-- same for $order_info['shipping_address_format']
$format = $order_info['payment_address_format'];
} else {
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' . "\n" . '{zone}' . "\n" . '{country}';
}*/
$format = '{firstname} {lastname}' . "\n" . '{company}' . "\n" . '{address_1}' . "\n" . '{address_2}' . "\n" . '{city} {postcode}' /*. "\n" . '{zone}'*/ . "\n" . '{country}';