0

Before a critical path update, i was missing the customers name on my dashboard BE.

ON

adminhtml/block/dashboard/orders/grid.php

Here is the column with the fault on line 87:

$this->addColumn('customer', array(
    'header'    => $this->__('Customer'),
    'sortable'  => false,
    'index'     => 'customer',
    'default'   => $this->__('Guest'),
));

Now, it returns a white space.

What i should check?

7
  • Your question is not clear. Could you clarify the situation you're facing? Aug 18, 2015 at 7:12
  • It's simple, my column Customer on '5 Last Orders' is always blank, but as i put my code, i wants to print is the customers name.
    – ntzz
    Aug 18, 2015 at 7:19
  • So, you have overridden the default Dashboard_Orders_Grid? Or, you're using the default core Dashboard_Orders_Grid & want to show names which are not showing. Aug 18, 2015 at 7:26
  • Is those customer names are showing in Sales_Order_Grid? Aug 18, 2015 at 7:27
  • I am using the default core dashboard_orders_grid , and the customers name display perfectly. The problem in this column, is that must show default 'Guest' , because the last 5 orders are from not logged customers but it don't display nothing. And yes, they are showing in sales_order_grid as customer or guest.
    – ntzz
    Aug 18, 2015 at 7:35

1 Answer 1

0

After looking for the error, i can't reproduce where it is, so i manage the error with STYLE & JS:

#lastOrdersGrid_table tbody td:empty:after { content: 'Guest' }

-

var cells = document.querySelectorAll( '#lastOrdersGrid_table tbody td:first-child' );

Array.prototype.slice.call( cells ).forEach( function( cell ) {
    if ( cell.innerHTML == ' ' )
    {
        cell.innerHTML = '';
    }
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.