Developer forum

Forum » Ecommerce - Standard features » Cart is not deleted when it contains taxes

Cart is not deleted when it contains taxes

Mario Santos Dynamicweb Employee
Mario Santos
Reply

Hi there,

It seems that a cart is not deleted from DB when last orderline is removed but the cart contains taxes.
Some repro steps:

  • Add a product to the cart;
  • Go to the checkout and enter address in order to get taxes;
  • Remove your orderline from the cart;
  • Empty cart is shown but the order is kept on the DB;


This seems to be related to the VerifyEmptyCart method on CartCatch.vb (see attachment).
Wouldn't make sense to validate for no cart.ProductOrderLines instead of cart.OrderLines?

Thanks!
BR, Mario
Capture.PNG

Replies

 
Nicolai Pedersen
Reply

Hi Mario

That change would also delete carts that only has a giftcard, so that is probably not a good idea :-).

I do not think this method needs a change - but when orderlines changes, the tax should be recalculated and result in the tax lines to be removed. Is this by any chance a custom tax provider?

BR Nicolai

 
Mario Santos Dynamicweb Employee
Mario Santos
Reply

Hi Nicolai,

I realized about the gift cards after submit the post ;-)
The project is using Avalara Tax Provider but I can repro this using the Flat Rate Tax Provider (Dynamicweb.Ecommerce.TaxProviders.EcomTaxProvider.EcomTaxProvider) on another solution as well.
The tax should be recalculated, and so as the discounts, but it doesn't seem to be that way (check attachment). Maybe empty cart is fired before?

BR Mario

Capture.PNG
 
Mario Santos Dynamicweb Employee
Mario Santos
Reply

bump.. any thoughts?

 

You must be logged in to post in the forum