Individual Item Tax calculation

Laszlo Csabi asked on October 3, 2019 01:36

I would like to calculate tax for individual cart items and store it with the orderitem, so later down the track when the customer wants refund we would know the tax paid for that particular item.

Since Kentico 12 calculates taxes for the collection of cart items, and stored in the TaxSummaryResult as a sum we won't be able to tell the exact tax figure for a selected cart item.

What would be the best approach here?

Recent Answers

Dmitry Bastron answered on October 3, 2019 10:11

Hi Laszlo,

I'd implement it like this:

  1. As long as OrderItemInfo is Customizable class in E-Commerce module - add a custom field to store tax there
  2. Subscribe to the global event of inserting/updating OrderInfo (or OrderItemInfo), calculate and save individual tax in OrderItem
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.