I only need a few, such as order number, customer, date, product and quantity, order status, total, and order id (basically the same column as you see in the screenshot) so the CSV file will only export the information I need, instead of all the information.
Im having a hard time trying to modify the code in
C:\xampp\apps\joomla\htdocs\administrator\components\com_hikashop\views\order\tmpl\export.php
I end up getting order number, customer, date, order status, and total to work, but still missing order_product_name and order_product_quantity
This is what I have as of now
$new_row = array();
foreach ($row as $key => $value)
{
if(in_array($key,array('order_number','name','order_created','order_full_price','order_product_name')))
$new_row[$key] = $value;
}
if($maxProd && !empty($productFields)){
for($i=1;$i<=$maxProd;$i++)
{
$prod =& $row->products[$i-1];
foreach($productFields as $field)
{
if(in_array($field,array('order_product_quantity','order_product_name')))
$n = 'item_'.$i.'_'.$field;
$new_row->$n = @$prod->$field;
}
}
}
$export->writeLine($new_row);
please give me some hint so I can finish it.
Thank you