In Lemax, the content of a shopping cart is saved in the database as a temporary reservation, with items in the shopping cart being saved as reservation items. When a booking is made from the shopping cart, this temporary reservation is deleted and an actual reservation is saved.
If you wish to fetch the shopping cart, you can do it by using GetShoppingCart method.
The method takes a GetShoppingCartRQ object as a parameter. That object has only two properties:
- ShoppingCartID – a string ID of the shopping cart
- LanguageID – a string ID of the language in which the content of the shopping cart should be returned (“en” for English, “de” for German etc.)
The method returns a GetShoppingCartRS object. That object also has only two properties:
- ShoppingCart – an object of type Reservation
- Status – an object that contains information if the fetching of the shopping cart was successful or not
The ShoppingCart property (of type Reservation) contains a list of ReservationItem objects which represent the items in the shopping cart. And that’s pretty much it.
Of course, ReservationItem objects have plenty of properties which you can display or not, according to your needs, and for a full list of those properties and their explanation, please consult our full API documentation.