Magento1.9 - How to include customer id in export customer csv
-
08-04-2021 - |
Solution
You can add customer_id(entity_id) in export CSV using following way :
You just simply add entity_id field in $validAttrCodes
array in following file:
/app/code/core/Mage/ImportExport/Model/Export/Entity/Customer.php
You can change in public function export()
function.
public function export()
{
$collection = $this->_prepareEntityCollection(Mage::getResourceModel('customer/customer_collection'));
$validAttrCodes = $this->_getExportAttrCodes();
array_unshift($validAttrCodes, "entity_id"); //Add Customer Id(entity_id) field.
$writer = $this->getWriter();
---------------------------------
---------------------------------
}
You can override /app/code/core/Mage/ImportExport/Model/Export/Entity/Customer.php
file in your custom module.
I hope it will helpful for you.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange