Script for Voucher/Coupon codes from Woo Commerse Wordpress website


We have an issue with voucher/coupon codes used on our Woo Commerse website. They are filtered into Linnworks showing the original amount and then on a seperate line showing the discount amount added.

We also use a software called Tradebox which imports from Linnworks and feeds onto Sage (accounting software). Tradebox cannot import the minus amount on the second line, so is only putting in the top line (the original amount before discount) which is obviously incorrect.

We spoke to Linnworks who says that this is standard for importing from our Woo Commerse site, however there is a script that can be written so that the discount is incorporated into the top line.

Could somebody please advise where we should go to do this and how to set up?

Kind Regards

LKM Trading LTD

1 person has this question


Please create a ticket from within your account in Customisation / Scripting group and we will have a look into this for you.

Kind regards,

Nikita Barford

Hi guys, I just ran into this issue on our Zen Cart integration (which I understand is very similar to Woo Commerce under the hood).  A discount coupon resulted in an Order Total adjustment in Zen Cart of -26.70 and appears in Linnworks as a Totals Adjustment line on the order.

Did you come up with a more friendly way of representing this data in Linnworks as the result of your support ticket?

I could try to pull some tricks in the GetOrderItems SQL query for our integration, to try to accomodate the ot_coupon Order Total amount by deducting from the value of one of the items, but that would get very messy very quickly :)

I've also tried altering the Order.OrderItems in Linnworks automation scripting, with which we could create a synthetic OrderItem for the order that represents the discount amount somehow or do some more complex price adjustment to get rid of the negative value, but ran into difficulty and was told they could not help me unless we paid them to write the script for them, or move to their new scripting framework which I was unable to get working on my Linux development platform (it's all heavily .NET/Visual Studio based).



Login to post a comment