Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Suggested answer

Where the cart is saved before payment?

Posted on by 2

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));

 

 

  • pka Profile Picture
    pka 2 on at
    RE: Where the cart is saved before payment?

    Hi Guanghui

    Just to share what I find out.  

    if add to the cart with current transaction ID, it will reflect to POS cart.  

                   Cart newCart = new Cart()

                   {

                       Id = "BDC-BDC-2-39",

                       CartLines = new List<CartLine>(),

                       TenderLines = new List<TenderLine>(),

                       StaffId = "000001",

                       TerminalId = "BDC-2",

                       WarehouseId = "RTBDC"

                   };

  • pka Profile Picture
    pka 2 on at
    RE: Where the cart is saved before payment?

    Ok, thank you.  I'll do that.  

  • Suggested answer
    Guanghui Profile Picture
    Guanghui on at
    RE: Where the cart is saved before payment?

    Can you log a SR to me then we can have a deeper investigation?

  • pka Profile Picture
    pka 2 on at
    RE: Where the cart is saved before payment?

    Hi Guanghui

    Thank you for your reply.

    I found the table.   The data is saved to table but doesn't reflect to MPOS cart.  Even I add staff ID to the cart header.  

    Cart newCart = new Cart()
    {
    Id = GenerateTransactionId(),
    CartLines = new List<CartLine>(),
    TenderLines = new List<TenderLine>(),
    StaffId = "000001"
    };

  • Suggested answer
    Guanghui Profile Picture
    Guanghui on at
    RE: Where the cart is saved before payment?

    The cart information is stored in crt.cartview , the table is crt.salestransaction, it is not readable because it is stored in the format of serialized object from C# code.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans