Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Logan 24 posts 65 karma points
    Jun 03, 2021 @ 15:00
    John Logan
    0

    Export orders by date range

    Hi

    First - great package- this is our 2nd site using vendr so still getting to grips with all it can do.

    I can see during a recent update(1.8) you added bulk export for orders.

    Our client wants to be able to export orders by date range - is that something you think will be released in a later update? - or perhaps it is available now and I just havn't found it yet?

    Also are there any docs/examples on the current exporting functionality. From what I can see you need to make an export template first and then use that for exporting the orders.

    It would be good to know what the current expectation/limitations are for the export templates.

    Cheers J

  • Matt Brailsford 4125 posts 22222 karma points MVP 9x c-trib
    Jun 03, 2021 @ 15:38
    Matt Brailsford
    0

    Hi John,

    We have a future task on the todo list to improve the search / filtering of orders which would then allow you to do date based filtering so yes it's on our list of things to do but we don't have a specific ETA on this.

    RE export template docs, we do need to write these but they should work the same way as the email and print templates. Essentially it runs the order entities through a razor template to generate some output and then exports that as the configured mimetype with the configured file extension as set in the export template settings.

    So for a CSV export for example, you'll want to set the mimetype to text/csv and the extension to csv and then point it to a razor template that generates some CSV output (which is what the default template shipped with Vendr does).

    The export strategy defines whether the razor template should be fed all the items at once with a model of IEnumerable<OrderReadOnly> or if each order should execute the template individual with a model of OrderReadOnly and then each rendered output is added to a zip file. This later option would be useful for things like exporting a series of JSON or XML files per order.

    The main limitation of this export feature is that all generation must produce some text based output format such as CSV, JSON or XML so things like PDF wouldn't be possible (but in this scenario I'd suggest creating a print template and printing to PDF).

    Hope this helps answer your questions.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft