Save the current cart server-side. Always updates the session cart from the given positions (backup of an unsubmitted cart). If cart autosave is active for the customer (shop setting cartAutosave plus customer opt-in), the cart is additionally written into an order: a new order on the first storable save, the same order on every following save - its id is returned as oid. Order mails of such autosaved orders are deferred to the end of the session. (JS) clients can call this periodically after cart changes; a later NewOrder/ChangeOrder for the same cart is routed to that order server-side, never to a duplicate.
Change Note: replaces /api/client/modifiedcart and /api/client/resetcart (exec1.jsp), which stay for old bundles
| HTTP Status | Error Code | Description |
|---|---|---|
| 403 | not_auth | User is not authenticated |
| 403 | security | Security violation |
Result of saving the current cart server-side (/api/client/savecart1)
| # | Field | Type | Description | Links |
|---|---|---|---|---|
| 0 | action | string | the action that was performed | |
| 1 | result | string | the exit/result code of the action | |
| 2 | oid | int | id of the order this cart has been saved into by cart autosave. 0 if the cart only lives in the session: autosave is off for this customer, the cart is not storable yet (see result, e.g. below_mbw), or this was the very first change of a new cart | 🔗 order_id |
| 3 | autosave | bool | true if cart autosave is active for this customer (shop setting cartAutosave AND customer opt-in customers.autosave); only then can oid be set |
Data (1 record)
| action | result | oid | autosave |
|---|---|---|---|
| ModifyCart | 0 →assign1 →dlvr1 →udlvr1 →order27 →order28 →order29 →state1 | false |