• Resolved Konstatninos

    (@skredlemon)


    Hi, I have been requested to export an .xlsx file with the following logic:

    Header Order 1
    1st ordered product details
    2nd ordered product details
    3rd ordered product details
    Header Order 2
    1st ordered product details
    Header Order 3
    1st ordered product details
    etc.

    Therefore the expected format would be something like this (with a delimiter of “;”)

    Type_of_line_0;Order_ID_1;Order_Details
    Type_of_line_1;Order_ID_1;Product_1_Details
    Type_of_line_1;Order_ID_1;Product_2_Details
    Type_of_line_1;Order_ID_1;Product_3_Details
    Type_of_line_0;Order_ID_2;Order_Details
    Type_of_line_1;Order_ID_2;Product_6_Details
    Type_of_line_0;Order_ID_3;Order_Details
    Type_of_line_1;Order_ID_3;Product_8_Details
    […]

    Firstly, does your plugin support this kind of format? Secondly, if it does, how should I go about creating such a file?

    So far I have only exported files with the following format:

    Order_ID_1;Product_1_Details;More_stuff
    Order_ID_1;Product_2_Details;More_stuff
    Order_ID_1;Product_3_Details;More_stuff
    Order_ID_2;Product_1_Details;More_Stuff
    Order_ID_3;Product_28_Details;More_Stuff
    […]

    Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    please, use CSV format .

    You must mark “Product rows start with a new line” inside section CSV too.
    So green(product) fields be printed at 2nd line.
    1st line will be gray (order) fields.

    thanks, Alex

    Thread Starter Konstatninos

    (@skredlemon)

    Thank you, that helped a bit.

    The issue I am having now is that I need to also include the Order ID in the second row. Unfortunately that is not possible because that field is not green but gray, and thus forces a line break where I don’t need one Hence the exported file is all broken.

    When I remove the Order ID, and leave all gray fields as a group, and all green fields as a second group, it all works fine.

    Any additional advice?

    Thank you.

    Plugin Author algol.plus

    (@algolplus)

    please, follow to https://docs.algolplus.com/algol_order_export/add-calculated-field-for-product/
    add (green!) key order_number and use this code

    add_filter('woe_get_order_product_value_order_number', function ($value, $order, $item, $product,$item_meta) {
    $value = $order->get_order_number();
    return $value;
    }, 10, 5);
    Thread Starter Konstatninos

    (@skredlemon)

    Works like a charm!

    Thank you tons for the prompt reply.

    Plugin Author algol.plus

    (@algolplus)

    You’re welcome

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to export with custom row format?’ is closed to new replies.