ShoppingCartGrid Data
Hi all :-)
I'am currently building my own shoppingcart checkout page in an ascx control. I'am using the shopping cart template as a foundation, but how can I access the data to the shoppingcart grid if I cannot map the template in sitefinity to a widget and a layout template?. Of course I can do a select statement on the tables but, is there any smarter way other way to get the grid databound?
Best regards
Henrik Stensgaard
Hi Henrik,
Thank you for using Sitefinity.
The cart API is based on the OrdersManager. You need to initialze an instance of an orders manager and then you can access methods such as GetCart() and GetCartDetails() which will query the database for the cart.
var om = OrdersManager.GetManager();
om.GetCartDetails();