• Resolved Stoton

    (@stoton1)


    Awesome plugin, been using it for a few years and its been great.

    I have created some custom product fields and mapped these to mirror the AusPost CSV template. I have everything pretty much working as expected except for the product column numbering.
    The AusPost CSV requires multiple products within an order to all be on the same row with the following format.

    (First product):
    Parcel Contents – Description | Parcel Contents – Weight | Parcel Contents – Value | Parcel Contents – Quantity | … etc
    (Second product):
    Parcel 2 Contents – Description | Parcel 2 Contents – Weight | Parcel 2 Contents – Value | Parcel 2 Contents – Quantity | … etc
    (Third product):
    Parcel 3 Contents – Description | Parcel 3 Contents – Weight | Parcel 3 Contents – Value | Parcel 3 Contents – Quantity | … and so on with 4th product etc

    Under plugin ‘Set up fields to export’ I have products set to ‘columns’ and ‘Grouping by product’ checked. However I am getting the following output:

    (First product):
    Parcel Contents – Description #1 | Parcel Contents – Weight #1 | Parcel Contents – Value #1 | Parcel Contents – Quantity #1 | … etc
    (Second product):
    Parcel Contents – Description #2 | Parcel Contents – Weight #2 | Parcel Contents – Value #2 | Parcel Contents – Quantity #2 | … and so on, etc.

    Would it be possible to output the column headers in the format required by AusPost CSV template? So that the first product attributes (description, weight, value, etc) are not numbered. But the second product and others following are numbered, with the numbering occurring after the word ‘Parcel’ and without the hash.

    Please let me know if this is achievable. Thanks again for a great export plugin.

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

    (@algolplus)

    hi @stoton1

    simplest way is fully overwrite CSV headers.
    please, open section “Misc Settings” , add following code and tweak it.

    add_filter( "woe_csv_header_filter", function($data ){
    return ["Parcel Contents – Description","Parcel Contents – Weight","Parcel Contents – Value","Parcel Contents – Quantity","Parcel 2 Contents – Description","Parcel 2 Contents – Weight","Parcel 2 Contents – Value","Parcel 2 Contents – Quantity"];
    });
    Thread Starter Stoton

    (@stoton1)

    Thanks very much @algol.plus

    That did the trick, though i had to change all headers. Finally no more copy / pasting…:)

    Thanks again.

    Plugin Author algol.plus

    (@algolplus)

    Yes, but alternative requires some programming.

    Thread Starter Stoton

    (@stoton1)

    Thanks @algolplus

    Its all good, this is working ok for my purposes.

    Thread Starter Stoton

    (@stoton1)

    I’ve had to download an XLS instead of CSV, so I’m now using this filter to change the headers.

    ‘woe_xls_header_filter’

    Plugin Author algol.plus

    (@algolplus)

    yes, it’s correct way

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change column numbering’ is closed to new replies.