how many orders do you export ? 100? less?
does button “export w/o progress” work ok for your export ?
Thread Starter
eivic
(@eivic)
I believe we only export a small number of orders at a time, between 1 and 5 orders.
The “export w/o progress” does work, but we still experience empty columns.
I don’t think I’ve properly explained myself in the original post, my apologies. We have multiple product types, so for example, if we are exporting an order with just an apron product the export still displays the columns for prescription glasses and other products. This causes the CSV to be quite large. We want to dynamically hide columns whenever they aren’t used. The columns are empty but have the correct heading. (Hope I’ve explained myself better).
Hello
Yes, I understand you, but could you submit your settings as new ticket to https://algolplus.freshdesk.com/?
Use >WooCommerce>Export Orders>Tools to get them.
thanks, Alex
for whom having same problem with CSV — just add this code to section “Misc Settings”
@session_start();
add_filter( "woe_csv_header_filter", function( $headers) {
$_SESSION['woe_rows']= array();
return $headers;
});
//save all rows to array
add_filter( "woe_csv_custom_output_func", function($custom_output,$handle,$data,$delimiter,$linebreak,$enclosure,$is_header) {
$_SESSION['woe_rows'][] = array_values($data);
return true;
},10,7);
add_action( "woe_csv_print_footer", function($handle, $formatter ){
$header = reset($_SESSION['woe_rows']);
foreach($header as $col=>$name) {
$col_empty = true;
for($i=1;$i<count($_SESSION['woe_rows']);$i++) {
if( !empty($_SESSION['woe_rows'][$i][$col])) $col_empty = false;
}
if($col_empty)
for($i=0;$i<count($_SESSION['woe_rows']);$i++) unset($_SESSION['woe_rows'][$i][$col]);
}
//done
foreach($_SESSION['woe_rows'] as $row) fputcsv($handle,$row);
},10,2);