I am currently using the Export_XLS extension to export my orders as CSV. The below code adds each line to the CSV for me to import to my courier and create shipping labels.
What I need is to add the SKU to the export. I am aware that the SKU is not part of the order table. Can someone please help me with this if possible?
Code: Select all
// Add each product line
$this->objPHPExcel->getActiveSheet()->setCellValue('A' . $counter, $this->data['orders'][0]['shipping_address_1']);
$this->objPHPExcel->getActiveSheet()->setCellValue('B' . $counter, $this->data['orders'][0]['shipping_address_2']);
$this->objPHPExcel->getActiveSheet()->setCellValue('C' . $counter, $this->data['orders'][0]['shipping_city']);
$this->objPHPExcel->getActiveSheet()->setCellValue('D' . $counter, $this->data['orders'][0]['shipping_zone']);
$this->objPHPExcel->getActiveSheet()->setCellValue('E' . $counter, $this->data['orders'][0]['shipping_postcode']);
$this->objPHPExcel->getActiveSheet()->setCellValue('F' . $counter, $this->data['orders'][0]['shipping_firstname']);
$this->objPHPExcel->getActiveSheet()->setCellValue('G' . $counter, $this->data['orders'][0]['shipping_lastname']);
$this->objPHPExcel->getActiveSheet()->setCellValue('H' . $counter, $this->data['orders'][0]['email']);
$this->objPHPExcel->getActiveSheet()->setCellValue('L' . $counter, $this->data['orders'][0]['order_id']);