More in this section

Forums / Ecommerce / Discount being removed when calling ObjectFactory.Resolve().CalculateAndSaveChanges(cartOrder)

Discount being removed when calling ObjectFactory.Resolve<IOrderCalculator>().CalculateAndSaveChanges(cartOrder)

1 posts, 0 answered
  1. Jason
    Jason avatar
    2 posts
    03 Mar 2016
    17 Jun 2016
    Link to this post

    I have been working on a e-commerce application written in Sitefinity and have come across a bug where the Discount is being removed from a CartOrder when trying to Calculate the order details.

    Everything is as expected with the correct shipping, tax and discount until ObjectFactory.Resolve<IOrderCalculator>().CalculateAndSaveChanges(cartOrder) is run regardless of when I run this. I have tried following your various blogs etc but have yet to find the correct solution.

    I used this blog to create the Discount (Although I changed it to be a CartDiscount)

    This blog for the initial setup of the Cart Order

    I used this tutorial to add products to the Cart

    I am hoping there is one value I am not setting which will allow the discount to persist as it appears to in the Standard Modules.

    Please let me know if you have any questions or suggestions or if you need a sample project.


1 posts, 0 answered