Июнь 27

добавляем редактирование поля в заказ в админке

order.html добавляем поле

<tr>
<td nowrap=»nowrap»>customer phone:</td>
<td><input type=»text» name=»customer_phone» size=»17″ maxlength=»255″ value=»{$order_info.customer_phone|escape:’html’}» /></td>
</tr>

 

в файл edit_order.php

$customer_phone = $this->getData(‘customer_phone’);

и

$info = compact(‘shipping_info’, ‘billing_info’, ‘products’, ‘discount’, ‘shipping_cost’, ‘payment_type’, ‘amount’, ‘comment’, ‘discount_descr’);
меняем на

$info = compact(‘shipping_info’, ‘billing_info’, ‘products’, ‘discount’, ‘shipping_cost’, ‘payment_type’, ‘amount’, ‘comment’, ‘discount_descr’,’customer_phone’);

 

в class.order_editor.php

строки

$fields = array_merge($fields, array(
‘payment_type’ => $order_info[‘payment_type’]
,’shipping_cost’ => $order_info[‘shipping_cost’]
,’order_discount’ => $order_info[‘discount’]
,’order_amount’ => $order_info[‘amount’]
,’customers_comment’ => $order_info[‘comment’]
,’discount_description’ => $order_info[‘discount_descr’]

меняемна

$fields = array_merge($fields, array(
‘payment_type’ => $order_info[‘payment_type’]
,’shipping_cost’ => $order_info[‘shipping_cost’]
,’order_discount’ => $order_info[‘discount’]
,’order_amount’ => $order_info[‘amount’]
,’customers_comment’ => $order_info[‘comment’]
,’discount_description’ => $order_info[‘discount_descr’]
,’customer_phone’ => $order_info[‘customer_phone’]