Is there anyone know about save cart behavior?
When we add item to cart, where is the cart line save before payment? Is the cart saved into a ChannelDB table?
For example in CRT TestHost project.
Cart newCart = new Cart()
{
Id = GenerateTransactionId(),
CartLines = new List<CartLine>(),
TenderLines = new List<TenderLine>(),
};
SaveCartRequest saveCartRequest = new SaveCartRequest(newCart);
SaveCartResponse saveCartResponse = runtime.Execute<SaveCartResponse>(saveCartRequest, new RequestContext(runtime));
CartLine newCartLine = new CartLine()
{
LineId = string.Empty,
ItemId = "888842543067",
ProductId = 5637171584,
InventoryDimensionId = string.Empty,
Quantity = 1
};
IList<CartLine> newCartLines = new List<CartLine>(new CartLine[] { newCartLine });
Cart updatedCart = saveCartResponse.Cart;
updatedCart.CartLines = newCartLines;
saveCartRequest = new SaveCartRequest(updatedCart);
saveCartResponse = runtime.Execute<SaveCartResponse>(saveCartRequest, new RequestContext(runtime));