Jump to content

In which table the detail of the discount coupon is saved


Uniplan
 Share

Recommended Posts

Hello,

I have an order in which a discount voucher has been partially used I would like to know in which table this information is saved.

In other words, I would like to know where the amount that I have highlighted in the figure is saved.

Thank you.

Greetings.

Antonio.

buono_sconto.jpg

Share this post


Link to post
Share on other sites

4 minutes ago, idnovate.com said:

But this value is stored in fields total_discounts, total_discounts_tax_incl, total_discounts_tax_excl from table ps_orders.

yes, at the time of order creation, values are being calculated according to applied discount as per the ps_cart_rule table and stored in ps_orders to reduce the joins and recalculation everytime while fetching order details.

So if we want the original discount information from where it is calculated, that is in ps_cart_rule and calculated amount is in ps_orders.

Edited by RachitAg03 (see edit history)

Share this post


Link to post
Share on other sites

29 minutes ago, RachitAg03 said:

All discounts define in ps_cart_rule table with how much price or percent will be applied. and the relation between order and this cart rule comes under ps_cart_cart_rule.

But in this table I find the total value of the coupon not the amount actually used

Share this post


Link to post
Share on other sites

2 minutes ago, Uniplan said:

But in this table I find the total value of the coupon not the amount actually used

As i said in my last quote 

27 minutes ago, RachitAg03 said:

yes, at the time of order creation, values are being calculated according to applied discount as per the ps_cart_rule table and stored in ps_orders to reduce the joins and recalculation everytime while fetching order details.

So if we want the original discount information from where it is calculated, that is in ps_cart_rule and calculated amount is in ps_orders.

as @idnovate.com  said 

31 minutes ago, idnovate.com said:

But this value is stored in fields total_discounts, total_discounts_tax_incl, total_discounts_tax_excl from table ps_orders.

So to get the actual amount you should go for ps_orders table.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More