Fixed customer edit routes
This commit is contained in:
@@ -107,18 +107,20 @@ class CustomerController extends AbstractCrudController
|
||||
'lastname' => $object->getLastname(),
|
||||
'email' => $object->getEmail(),
|
||||
'title' => $object->getTitleId(),
|
||||
|
||||
'company' => $address->getCompany(),
|
||||
'address1' => $address->getAddress1(),
|
||||
'address2' => $address->getAddress2(),
|
||||
'address3' => $address->getAddress3(),
|
||||
'phone' => $address->getPhone(),
|
||||
'cellphone' => $address->getCellphone(),
|
||||
'zipcode' => $address->getZipcode(),
|
||||
'city' => $address->getCity(),
|
||||
'country' => $address->getCountryId(),
|
||||
);
|
||||
|
||||
if ($address !== null) {
|
||||
$data['company'] = $address->getCompany();
|
||||
$data['address1'] = $address->getAddress1();
|
||||
$data['address2'] = $address->getAddress2();
|
||||
$data['address3'] = $address->getAddress3();
|
||||
$data['phone'] = $address->getPhone();
|
||||
$data['cellphone'] = $address->getCellphone();
|
||||
$data['zipcode'] = $address->getZipcode();
|
||||
$data['city'] = $address->getCity();
|
||||
$data['country'] = $address->getCountryId();
|
||||
}
|
||||
|
||||
// A loop is used in the template
|
||||
return new CustomerUpdateForm($this->getRequest(), 'form', $data);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<div class="customers edit-customer">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
{loop name="customer_edit" type="customer" current="false" id="$customer_id" backend_context="1" lang="$edit_language_id"}
|
||||
|
||||
<ul class="breadcrumb">
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
|
||||
<td>{format_date date=$CREATE_DATE}</td>
|
||||
<td>{$orderInvoiceCompany}</td>
|
||||
<td><a href="{url path="/admin/customer/update/$CUSTOMER"}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td><a href="{url path='/admin/customer/update' customer_id=$CUSTOMER}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td>{$TOTAL_TAXED_AMOUNT}</td>
|
||||
<td><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
</tfoot>
|
||||
|
||||
{/ifloop}
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="modules">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
|
||||
<div class="clearfix">
|
||||
<ul class="breadcrumb pull-left">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
@@ -68,7 +68,7 @@
|
||||
{/loop}
|
||||
|
||||
<tr>
|
||||
<td><a href="{url path="/admin/customer/update/{$ID}"}">{$REF}</a></td>
|
||||
<td><a href="{url path='/admin/customer/update' customer_id=$ID}">{$REF}</a></td>
|
||||
|
||||
<td>
|
||||
{$COMPANY}
|
||||
@@ -91,7 +91,7 @@
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.customer" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path="/admin/customer/update/{$ID}" }"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path='/admin/customer/update' customer_id=$ID }"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_send_mail" role="ADMIN" resource="admin.customer" access="VIEW"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{$EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
|
||||
@@ -148,7 +148,7 @@
|
||||
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
|
||||
<td>{format_date date=$CREATE_DATE}</td>
|
||||
<td>{$orderInvoiceCompany}</td>
|
||||
<td><a href="{url path="/admin/customer/update/$CUSTOMER"}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td><a href="{url path='/admin/customer/update' customer_id=$CUSTOMER}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td>{$TOTAL_TAXED_AMOUNT}</td>
|
||||
<td><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user