Quantcast
Channel: Customized Commerce 13 and earlier versions
Viewing all articles
Browse latest Browse all 9642

Dealing correctly with the cart-to-order process

$
0
0

Hi

I have a case right now where the call to _orderRepository.SaveAsPurchaseOrder() has succeeded, but where a call to _orderRepository.Save() later has failed, leaving me with an order that is missing important information, including billing info.

The checkout process so far has been to convert the cart into a purchase order first, and then adding the relevant order information afterwards, finishing off with a Save(). Since this is clearly not a safe approach, I thought I'd try doing it the other way, where I'd set all the important information on the cart first, and then convert the cart to an order as the last step. For a lot of the information, this worked okay, but certain things did not get copied over, such as values in the Properties and the Notes properties.

Since that didn't work either, I want to ask: Is there some way to ensure that I either atomically create a complete order or fail entirely without leaving half-completed orders behind?


Viewing all articles
Browse latest Browse all 9642

Trending Articles