savedorderformsoccaddon AddOn
The Saved Order Forms AddOn for OCC provides the REST API for the Saved Order Forms feature, which allows users to save a list of products that can be added to the cart at a later time.
Dependencies
AddOn Definition
| Name | savedorderformsoccaddon |
| Description | This AddOn provides the REST API for the Saved Order Forms functionality. |
| Requires | savedorderforms Extension |
| Author | SAP Commerce Cloud |
Supported Markets and Channels
| Supported | B2C Commerce | B2B Commerce | Telco Commerce |
|---|---|---|---|
| Market | |||
| Channel | Desktop: Mobile: |
Desktop: Mobile: |
Desktop: Mobile: |
Installing and Activating the savedorderformsoccaddon AddOn
The savedorderformsoccaddon AddOn requires the savedorderforms and ycommercewebservices extensions.
- Ensure that savedorderformsoccaddon and ycommercewebservices are listed in config/localextensions.xml and that the entries are not commented out, as shown in the following example.
... <extension name="savedorderformsoccaddon" /> <extension name="savedorderforms" /> <extension name="ycommercewebservices" /> ...
- Run the following ant task:
ant addoninstall -Daddonnames="savedorderformsoccaddon" -DaddonStorefront.ycommercewebservices="ycommercewebservices"
- Run ant all.
- Rebuild the system. In the SAP Commerce Cloud Administration Console (localhost:9001):
- For a new installation, initialize the system ().
- If performing an update of the system (), use the following options:
- Select the options Update running system, Create essential data, and Localize types.
- In the project data settings, select the savedorderformsoccaddon check box.
REST API Service
The web service can be used to view, create, update and delete order forms.
The following table summarizes the REST web services.
| Resource | Type | Description |
|---|---|---|
| https://<DOMAIN>/rest/v2/<STOREFRONT>/orderforms | GET | Returns a list of saved order forms with details that are associated with a user. |
| https://<DOMAIN>/rest/v2/<STOREFRONT>/orderforms/<orderformID> | GET | Returns the details of the specific order form. |
| https://<DOMAIN>/rest/v2/<STOREFRONT>/orderforms | POST | Creates an order form. If the order form ID already exists, 400 Bad Request is returned, and the current order form is not changed. |
| https://<DOMAIN>/rest/v2/<STOREFRONT>/orderforms/<orderformID> | PUT | Replaces the information in an existing order form with the new information. |
| https://<DOMAIN>/rest/v2/<STOREFRONT>/orderforms/<orderformID> | DELETE | Deletes the order form. |
| https://<DOMAIN>/rest/v2/<STOREFRONT>/orderforms/<orderformID>/cart | POST | Adds products from the order form to the current cart. Quantities for products already in the cart that are in the saved order form are updated. |
Use of the "fields" Parameter
For GET calls, the fields parameter can be appended to the URL. For example: https://<DOMAIN>/rest/v2/<STOREFRONT>/orderforms?fields=BASIC
The parameters <BASIC>, <FULL>, and <DEFAULT> are currently supported; however the same information is currently returned.
Modifications Checklist
For reference and a source for examples, the modifications this AddOn makes to Accelerator and SAP Commerce Cloud are shown in the check list below.
| Impex Configuration Scripts |
|
| Core Data Listeners |
|
| Model Layer |
|
| Model Interceptors |
|
| Cockpit Configuration |
|
| Cockpit Beans |
|
| Validation Rules |
|
| Buildcallback script |
|
| Service Layer |
|
| Facade DTO |
|
| Facade Layer |
|
| CMS Components |
|
| Page Templates |
|
| JavaScript |
|
| CSS |
|
| Before view interceptor |
|
| Page Controllers |
|
| Tags |
|
| TLD |
|
| Filters |
|
| MVC Interceptors |
|
| Spring Security |
|
| Message Resources |
|
| Unit Tests |
|

