Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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?
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.
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 :)
That's a good idea. Let's see what we can do next week. 👍
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted