Copied to clipboard

Flag this post as spam?

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


  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jun 13, 2019 @ 07:29
    Rasmus Fjord
    0

    How to get used discountcode on the specific orderline

    So we are in a case where we are integrating TC with an ERP, and the customer wants to on which orderline a discountcode was used upon.

    This is from what I can see on the order object not possible.

    The discount is given on the orderline but the discountcode is not added as a property on the orderline, but on the main part of the order object you can see which codes are used.

    Is there a way to get this information?

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 13, 2019 @ 12:44
    Matt Brailsford
    1

    Hi Rasmus,

    I'm currently away so can't dig into this fully just now, but a believe your assumptions are correct.

    The only think I can think to do atm would be to implement your own discount rule, extending the core discount code rule and let the base rule do its thing, but if it's successful, store the code against the orderline.

    I can't point you to any code ATM, but hopefully this gives you some place to look. If not, I'm back next week so can try and help you further then.

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Jun 13, 2019 @ 13:02
    Rasmus Fjord
    0

    Hey Matt

    No worries and rush, and great that its not just me hehe :)

    I was thinking if we, together, could add it to the core instead? would make more sense, if a discountcode applied to an orderline, that it would be available on the orderline aswell, especially for any big orders(lots of lines etc.).

    Lets try it out when you got time and are back :)

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Jun 13, 2019 @ 13:51
    Matt Brailsford
    0

    Hey Rasmus,

    That's a good idea. Let's see what we can do next week. 👍

Please Sign in or register to post replies

Write your reply to:

Draft