1

I currently use XTENTO Enhanced Order Grid to add fields to the customer grid which works perfectly.

I need to however put in a column for the customers last order date.

I have searched however the only code I found also added in total number of orders and didn't specify the files I needed to edit.

Does anyone have any advice on how I can create / populate this field when an order is placed so I can show it in my grid?

Thanks!

  • 1
    Do you want to place a column (last placed order date by customer) under customer grid? – Rahul Kumar Das Jun 2 '15 at 13:16
  • Hi, yes that's correct a column that shows all customers last order date – KiwisTasteGood Jun 2 '15 at 13:33
2

Please check the following link:

| improve this answer | |
  • Thanks, the top one I have read and the issue is it adds two columns and I don't need the total number of orders column. Do I add the code in that example to "app/code/core/Mage/Adminhtml/Block/Customer/Grid.php" ? – KiwisTasteGood Jun 2 '15 at 13:49
  • If you don't want to have both the columns, then delete the part $this->addColumn('orders_count', array( 'header' => Mage::helper('customer')->__('Orders Count'), 'index' => 'orders_count', )); from the function _prepareColumns(), that will do the job – Rahul Kumar Das Jun 3 '15 at 6:30
  • Yes, you can add the codes in app/code/core/Mage/Adminhtml/Block/Customer/Grid.php, but it's a better practise to overwrite the block from local scope – Rahul Kumar Das Jun 3 '15 at 6:37

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.