orocommerce icon indicating copy to clipboard operation
orocommerce copied to clipboard

Customer view in Admin needs to have Account name and link

Open arthurpro opened this issue 7 years ago • 3 comments

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.

arthurpro avatar Oct 10 '17 19:10 arthurpro

An internal task to implement it created (id: BB-12465). @arthurpro , thank you again for the contribution.

mymias avatar Oct 12 '17 08:10 mymias

any update about this issue?

Thanks.

develop-algoritma avatar Mar 22 '19 15:03 develop-algoritma

@develop-algoritma it is scheduled for the next LTS release (4.1 LTS)

mbessolov avatar Mar 22 '19 16:03 mbessolov