Copied to clipboard

Flag this post as spam?

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


  • seanrock 262 posts 483 karma points
    Oct 19, 2020 @ 09:49
    seanrock
    0

    Search orders for discount codes

    Hi

    I've tried searching the orders list using a discount code I know has been used, however the expected order(s) isn't returned in the search.

    Is there a way to get a list of orders that have had a specific code applied? Or a list of discount codes that have been used?

    Thanks.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Oct 19, 2020 @ 09:57
    Matt Brailsford
    101

    Hey Sean,

    The back office order search currently only searches against the customer name + order number. We have a task to implement a more advanced search but it's not scheduled yet.

    I'm not sure we have anything at an API level that would give you these search results so it might need to be a DB query to fetch this. You'll want to query the vendrAppliedDiscountCode table for values with isFulfilled set to true. This will give you the list of discounts that have been redeemed along with the order ID that they were redeemed on.

    Hope this helps

    Matt

  • seanrock 262 posts 483 karma points
    Oct 19, 2020 @ 10:03
    seanrock
    0

    Ok thanks for the info Matt.

    Cheers.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Oct 19, 2020 @ 10:08
    Matt Brailsford
    0

    If you want to raise this on the issue tracker, this could make a nice feature on the discount edit screen. We could have something you could click to see discount / code usage which could open a dialog that lists the orders that have used it?

    https://github.com/vendrhub/vendr/issues

    Matt

  • seanrock 262 posts 483 karma points
    Oct 19, 2020 @ 10:14
    seanrock
    0

    Yeah, that would be a nice feature. Our customer has asked about this but its not massively urgent right now. If we can get it from sql it will do in the short term.

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft