Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Third Party Tax Calculator and Saving Taxes in EPiServer 11

$
0
0

Hello,

We use a thrid party service to calculate the taxes for our orders on our site.  I've been in the process of moving over to using the new order system and have ran into a problem with saving the tax value that is returned back from the service. (CMS 11.9.1 and Commerce 11.8.5)

Below is what we used to use to save the tax that we received.

Order Form

// Tax and total order form
orderForm.TaxTotal = orderFormTaxTotal;
orderForm.Total = orderForm.SubTotal + orderForm.ShippingTotal + orderForm.HandlingTotal + orderForm.TaxTotal;
orderForm.AcceptChanges();

Order Group

// Tax and total order
orderGroup.TaxTotal = orderTaxTotal;
orderGroup.Total = orderGroup.SubTotal + orderGroup.ShippingTotal + orderGroup.HandlingTotal + orderGroup.TaxTotal;
orderGroup.AcceptChanges();

I converted from an IOrderGroup to an OrderGroup and went through the process and saw that it hit everything correctly, but when I got to the next step in our checkout process I saw that it wasn't displaying the tax and the tax values were not saved in the database.  I made changes to use the IOrderGroup instead of the OrderGroup and when I got to the point of changing the above code I didn't see a way to save the tax value.

Is there a way of saving Tax this way?

Thank you,

Kevin Larsen


Viewing all articles
Browse latest Browse all 9076

Trending Articles