Page 1 of 1

Find out which products uses discount in order

Posted: Fri Apr 09, 2021 3:59 am
by Silencer
My customer can enter some promo code which is only applied to some products. I am now sending data to my accounting system and I don't know how to get data from database which products in users order use discount. I can get total discount (but that doesn't add up since I am guessing that value if before total tax). I am using OC version 2.1.0.1.

Re: Find out which products uses discount in order

Posted: Fri Apr 09, 2021 5:34 pm
by wrick0
this should be stored in oc_product_discount in mysql based on the product_id so you will have to use that data (i dont use it in my stores so i cant exactly see)

Re: Find out which products uses discount in order

Posted: Fri Apr 09, 2021 6:16 pm
by paulfeakins
Silencer wrote:
Fri Apr 09, 2021 3:59 am
My customer can enter some promo code which is only applied to some products. I am now sending data to my accounting system and I don't know how to get data from database which products in users order use discount. I can get total discount (but that doesn't add up since I am guessing that value if before total tax). I am using OC version 2.1.0.1.
This is the sort of custom development that requires a developer such as ourselves or post a job in the Commercial Support Forum.