SCC_SC_SAVECART
This service operation saves a single or multiple items to the cart for a user. The service operation first deletes all the items in the cart for the user and then adds the new items to the cart.
Once the items are saved to the cart, the service operation retrieves all the cart items for the user and sends them back in the response message. In other words, if an error does not occur, the response message contains all the cart items.
There is a difference between SCC_SC_ADDITEM and SCC_SC_SAVECART. If an item already exists in the cart and the user adds it again, SCC_SC_ADDITEM first removes the item from the table and then adds the item again. SCC_SC_SAVECART first deletes all the existing cart items and then adds all the items that are in the request message.
Example: A student uses the enrollment shopping cart to clear all the existing cart items and then adds the new classes in which he or she wants to enroll. After adding the new classes, the student clicks the save link. In such a case, the enrollment shopping cart uses the SCC_SC_SAVECART operation to first remove the existing cart items and then add the new classes to the enrollment shopping cart item table.