• Hey!

    I wanted to export Order-Data like “Shipping Date, Customer …” and so on, but sometimes there is the same row twice. First it seemed like an problem with a free product, that has no VAT, which was the only difference between the two lines (same Invoice Number, Same Customer …) but there are double rows without any difference, too.

    Maybe there was a similar problem in the past? Or maybe we have to hide a row if the invoice-number is the same?

    Greetings! šŸ™‚

    • This topic was modified 8 years, 2 months ago by philipewert.
Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hi

    Could you turn off “Populate other columns if products exported as rows” at tab “XLS”? or remove field “Products” from export ?

    thanks, Alex

    Thread Starter philipewert

    (@philipewert)

    Hey!

    If I turn off “Populate other columns if products exported as rows” the copied row is replaced with an empty row.

    If I remove the field “Products” there are no doubled rows and no empty ones.

    But obviously I need the Product field šŸ™‚

    Greetings

    • This reply was modified 8 years, 2 months ago by philipewert.
    Plugin Author algol.plus

    (@algolplus)

    Could you open “setup fields” , go to Products and select “export as XX columns”?

    Thread Starter philipewert

    (@philipewert)

    It’s selected by default. Even “export as rows” did no change. :/

    Plugin Author algol.plus

    (@algolplus)

    hi

    Could you upload wrong file to helpdesk ?

    thanks, Alex

    Thread Starter philipewert

    (@philipewert)

    I’m afraid that’s not possible, I’m very sorry.

    But, is it possible, that we filter the blank rows just before the .xls Output?
    That would have the same effect, but a bit “dirty” šŸ˜€

    Greetings!

    Plugin Author algol.plus

    (@algolplus)

    you can try add this code to section “Misc Settings”.

    add_filter("woe_xls_output_filter",function($data,$formatter){
      $t = join("",$data);
       return empty($t) ? false : $data;
    },10,2);
    Thread Starter philipewert

    (@philipewert)

    Okay it seems like I gave a false information. The empty rows are not totally empty, there is only the TAX, sorry!

    But I switched some preferences and found out, that if I select “export as XX columns” and leave the “Number-Field” empty, the plugin creates me two column “Tax #1” and “Tax #2”. It seems like the problem is, that the plugin thinks, some products got different Tax-Values?

    I mean, is it possible to display the Taxes for the whole order. Because the right now I display the Taxes through the “Products Field” right?

    Greetings!

    Plugin Author algol.plus

    (@algolplus)

    Do you see another fields with postfix “#2” ? or only Tax ?

    Thread Starter philipewert

    (@philipewert)

    No, only “Tax”.
    Sometimes the right Tax is in the “Tax #1” Column, sometimes in “Tax #2″…

    Plugin Author algol.plus

    (@algolplus)

    Do you use ANY custom code from page https://algolplus.com/plugins/code-samples/ ?

    Thread Starter philipewert

    (@philipewert)

    No. Only one code-sample in another Export-Profile.

    Plugin Author algol.plus

    (@algolplus)

    Do you use “filter by products” in this profile ?

    there is only one reason for duplicated rows — order has many products.

    Thread Starter philipewert

    (@philipewert)

    The only filter I’m using is “filter by order-status”.

    Plugin Author algol.plus

    (@algolplus)

    Following code adds “order tax rate”, it takes tax rate from first item having tax!

    // add field  "order tax rate "
    add_filter('woe_get_order_fields', function ($fields) {
        $fields['tax_rate'] = array( 'label' => 'Tax rate', 'colname' => 'Tax rate', 'checked' => 1 );
        return $fields;
    });
    // calculate  new field
    add_filter('woe_get_order_value_tax_rate', function ($value,$order, $field) {
        foreach ( $order->get_items( 'line_item' ) as $item) {
            if( $item['line_subtotal_tax']>0 ) { // take first tax!
                return round( $item['line_subtotal_tax']/$item['line_subtotal']*100, 2);
            }
        }
        return 0;
    }, 10, 3);
Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Bug: Double Row Export’ is closed to new replies.