orocommerce
orocommerce copied to clipboard
Customer view in Admin needs to have Account name and link
Customer view page doesn't show a name of an account it is related to.
I had to override infoAction in my custom CustomerController.
public function infoAction(Customer $customer)
{
$account = null;
$am = $this->get('oro_sales.manager.account_customer');
if ($salesCustomer = $am->getAccountCustomerByTarget($customer, false)){
$account = $salesCustomer->getAccount();
}
return [
'entity' => $customer,
'account' => $account,
'treeData' => $this->get('oro_customer.customer_tree_handler')->createTree($customer),
];
}
also I added few lines into overridden template
{% if account %}
{{ UI.renderHtmlProperty('oro.account.name.label'|trans, UI.entityViewLink(account, account.name, 'oro_account_view')) }}
{% endif %}
Please add this feature to an upcoming release.
An internal task to implement it created (id: BB-12465). @arthurpro , thank you again for the contribution.
any update about this issue?
Thanks.
@develop-algoritma it is scheduled for the next LTS release (4.1 LTS)