Skip to content

Commit

Permalink
Updated documentation for the latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
apanwar committed Apr 18, 2024
1 parent 56c9aa3 commit 3c9fde7
Show file tree
Hide file tree
Showing 20 changed files with 490 additions and 727 deletions.
27 changes: 7 additions & 20 deletions delivery-slot-management-btp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Given this is a demo extension and not a production ready code, we have simplifi
Here are the instructions to configure locally the extension and make it work. The extension has been developed to work with the standard `electronics-spa accelerator`, although it should easily work with other SAP accelerators as well with small changes.

### Install the BTP Kyma Microservice
Follow the instructions at https://github.tools.sap/cx-boosters/easy-btp-delivery-slot-management/blob/main/deliveryslotmanagement-btp/README.md
Follow the instructions at [Delivery Slot Management Services on BTP](https://github.tools.sap/cx-boosters/easy-btp-delivery-slot-management/blob/main/deliveryslotmanagement-btp/README.md)

### Install SAP Commerce Platform

Expand All @@ -73,27 +73,14 @@ First thing is then to install the latest 2205 commerce version. Follow the offi
- [Using the Installer Recipes](https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/8be4e0379b294fbabf36d26e7ca4169d/cb3ff964e4784073a70f06165efbac8a.html?locale=en-US&version=v2205) to install using the cx recipe
- [Installing SAP Commerce Cloud Manually](https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/8be4e0379b294fbabf36d26e7ca4169d/8bf5cfea86691014a00e9705a3c84074.html?locale=en-US&version=v2205) to install manually if you know the required extensions to set up the electronics or apparel-uk accelerator

### Install the Easy Extension Framework
1. Download [Easy Extension Framework](https://github.com/SAP/easy-extension-framework)
2. Add Easy extensions to your `localextensions.xml` file:
```
<extension dir="easycore" />
<extension dir="easytype" />
<extension dir="easybackoffice" />
<extension dir="easyrest" />
```
3. Run `ant clean all`
4. Run `ant initialize -Dtenant=master`
5. Start SAP Commerce Cloud server with `<HYBRIS_HOME>/bin/platform/hybrisserver.sh`
### Install the Easy Framework
Install `Easy Extension Framework` as explained in the [documentation](https://sap.github.io/easy-extension-framework/install-for-existing-setup.html).

### Configure local Easy repository
### Configure Local Easy repository
Next you'll have to configure the Git repository where the tutorial extension is stored. If you want to play around locally with the extension we suggest you to create a local easy repository that will simplify and speed up your development.
Follow these steps:
- Clone locally the [Easy Extension Sample](https://github.com/SAP-samples/easy-extension-samples) repository
- Login into the backoffice and find the Easy node on the Navigation Tree, open Easy Core, Repositories and click on the + button to create a new "local repository"
![img.png](./images/img.png)
- populate the wizard giving the repo a code, name and the path of your local File System where you've cloned the remote easy-extension-samples repo
![img_1.png](./images/img_1.png)
Follow these [steps](https://sap.github.io/easy-extension-framework/configuring-an-easy-repository-in-backoffice/):
- Clone locally the [Easy Extension Sample](https://github.tools.sap/cx-boosters/easy-extension-samples/tree/easy-0.2) repository (branch compatible to the installed Easy Extension Framework version. For example: The compatible branch for `v0.x` of Easy Extension Framework is `easy-0.x`).
- Configure it as the Local Repository as explained in the [documentation](https://sap.github.io/easy-extension-framework/configuring-an-easy-repository-in-backoffice.html#configuring-a-local-repository).

### Install Delivery Slot Management Btp Easy extension
Easy extensions have to be installed through the Administration Console:
Expand Down
23 changes: 5 additions & 18 deletions delivery-slot-management/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,14 @@ First thing is then to install the latest 2205 commerce version. Follow the offi
- [Using the Installer Recipes](https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/8be4e0379b294fbabf36d26e7ca4169d/cb3ff964e4784073a70f06165efbac8a.html?locale=en-US&version=v2205) to install using the cx recipe
- [Installing SAP Commerce Cloud Manually](https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/8be4e0379b294fbabf36d26e7ca4169d/8bf5cfea86691014a00e9705a3c84074.html?locale=en-US&version=v2205) to install manually if you know the required extensions to set up the electronics or apparel-uk accelerator

### Install the Easy Extension Framework
1. Download [Easy Extension Framework](https://github.com/SAP/easy-extension-framework)
2. Add Easy extensions to your `localextensions.xml` file:
```
<extension dir="easycore" />
<extension dir="easytype" />
<extension dir="easybackoffice" />
<extension dir="easyrest" />
```
3. Run `ant clean all`
4. Run `ant initialize -Dtenant=master`
5. Start SAP Commerce Cloud server with `<HYBRIS_HOME>/bin/platform/hybrisserver.sh`
### Install the Easy Framework
Install `Easy Extension Framework` as explained in the [documentation](https://sap.github.io/easy-extension-framework/install-for-existing-setup.html).

### Configure local Easy repository
### Configure Local Easy repository
Next you'll have to configure the Git repository where the tutorial extension is stored. If you want to play around locally with the extension we suggest you to create a local easy repository that will simplify and speed up your development.
Follow these [steps](https://sap.github.io/easy-extension-framework/configuring-an-easy-repository-in-backoffice/):
- Clone locally the [Easy Extension Sample](https://github.tools.sap/cx-boosters/easy-extension-samples/tree/easy-0.2) repository (branch easy-0.2)
- Login into the backoffice and find the Easy node on the Navigation Tree, open Easy Core, Repositories and click on the + button to create a new "local repository"
![img.png](./images/img.png)
- populate the wizard giving the repo a code, name and the path of your local File System where you've cloned the remote easy-extension-samples repo
![img_1.png](./images/img_1.png)
- Clone locally the [Easy Extension Sample](https://github.tools.sap/cx-boosters/easy-extension-samples/tree/easy-0.2) repository (branch compatible to the installed Easy Extension Framework version. For example: The compatible branch for `v0.x` of Easy Extension Framework is `easy-0.x`).
- Configure it as the Local Repository as explained in the [documentation](https://sap.github.io/easy-extension-framework/configuring-an-easy-repository-in-backoffice.html#configuring-a-local-repository).

### Install Delivery Slot Management Easy extension
Easy extensions have to be installed through the Administration Console:
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sap.cx.boosters.easy.deliveryslotmanagement.populators

import com.sap.cx.boosters.easy.deliveryslotmanagement.models.DeliverySlotManagementOrderModel
import com.sap.cx.boosters.easy.deliveryslotmanagement.models.DeliverySlotManagementModel
import de.hybris.platform.commercefacades.order.data.OrderData
import de.hybris.platform.converters.Populator
import de.hybris.platform.core.model.order.OrderModel
Expand All @@ -13,11 +13,10 @@ class HomeDeliveryModeOrderPopulator implements Populator<OrderModel, OrderData>

@Override
void populate(OrderModel source, OrderData orderData) throws ConversionException {
if (source instanceof DeliverySlotManagementOrderModel) {
def orderModel = source as DeliverySlotManagementOrderModel
if (orderModel.getDeliveryMode().getCode().startsWith("homedelivery")) {
def dsm = orderModel.getDeliveryslotmanagement()
orderData.getDeliveryMode().setDescription("You'll receive your items on: ${dsm.getDeliveryslot().getStarttime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"))}")
if (source.getDeliveryMode().getCode().startsWith("homedelivery")) {
DeliverySlotManagementModel dsm = source.getProperty('deliveryslotmanagement') as DeliverySlotManagementModel
if (null != dsm) {
orderData.deliveryMode.description = "You'll receive your items on: ${dsm.deliveryslot.starttime.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"))}"
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions delivery-slot-management/src/main/resources/easy.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,5 @@ easytype.Vehicle.modelClass=com.sap.cx.boosters.easy.deliveryslotmanagement.mode
easytype.DeliverySlot.modelClass=com.sap.cx.boosters.easy.deliveryslotmanagement.models.DeliverySlotModel
easytype.DeliverySlotManagement.modelClass=com.sap.cx.boosters.easy.deliveryslotmanagement.models.DeliverySlotManagementModel
easytype.DeliverySlotStatus.modelClass=com.sap.cx.boosters.easy.deliveryslotmanagement.enums.DeliverySlotStatus
easytype.Cart.modelClass=com.sap.cx.boosters.easy.deliveryslotmanagement.models.DeliverySlotManagementCartModel
easytype.Order.modelClass=com.sap.cx.boosters.easy.deliveryslotmanagement.models.DeliverySlotManagementOrderModel
homeDelivery.minimumLeadTime=1
homeDelivery.maximumLeadTime=7
4 changes: 0 additions & 4 deletions delivery-slot-management/src/main/resources/easytypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,6 @@
"autocreate": "false",
"generate": "false",
"superType": "AbstractOrder",
"modelClassName" : "DeliverySlotManagementCartModel",
"superTypeModelClass": "de.hybris.platform.core.model.order.CartModel",
"attributes": [
{
"qualifier": "deliveryslotmanagement",
Expand Down Expand Up @@ -403,8 +401,6 @@
"autocreate": "false",
"generate": "false",
"superType": "AbstractOrder",
"modelClassName" : "DeliverySlotManagementOrderModel",
"superTypeModelClass": "de.hybris.platform.core.model.order.OrderModel",
"attributes": [
{
"qualifier": "deliveryslotmanagement",
Expand Down
28 changes: 7 additions & 21 deletions easy-tutorial-step1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ In this tutorial, we will build a new extension to add new features that do not
To understand what we will build during this tutorial, you can check the final outcome: [delivery-slot-management](https://github.tools.sap/cx-boosters/easy-extension-samples/tree/main/delivery-slot-management/README.md) extension. You will find in the documentation the list of features.

In this tutorial, you will learn:
- [How to setup your development environment](#easy-tutorial-step-1---setup-your-development-environment)
- [How to extend SAP Commerce data model](../easy-tutorial-step2)
- [How to create and override Spring Beans](../easy-tutorial-step3)
- [How to create new REST endpoints](../easy-tutorial-step4)
Expand All @@ -15,7 +14,7 @@ In this tutorial, you will learn:
# Easy Tutorial Step 1 - Setup your Development Environment

## Overview
In this step of the tutorial, you will learn how to setup Easy Extension Framework, install a new extension and setup your IDE.
In this step of the tutorial, you will learn how to setup Easy Extension Framework, install a new extension and set up your IDE.

## Setup
Here are the instructions to configure locally the extension and make it works. The extension has been developed to work with the standard electronics-spa accelerator, although it can work easily with other spa accelerators as well with small changes.
Expand All @@ -30,26 +29,13 @@ First thing is then to install the latest 2205 commerce version. Follow the offi
- [Installing SAP Commerce Cloud Manually](https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/8be4e0379b294fbabf36d26e7ca4169d/8bf5cfea86691014a00e9705a3c84074.html?locale=en-US&version=v2205) to install manually if you know the required extensions to set up the electronics or apparel-uk accelerator

### Install the Easy Framework
1. Download [Easy Extension Framework](https://github.com/SAP/easy-extension-framework)
2. Add Easy extensions to your **localextensions.xml** file:
```
<extension dir="easycore" />
<extension dir="easytype" />
<extension dir="easybackoffice" />
<extension dir="easyrest" />
```
3. Run `ant clean all`
4. Run `ant initialize -Dtenant=master`
5. Start SAP Commerce Cloud server with `<HYBRIS_HOME>/bin/platform/hybrisserver.sh`

### Configure local Easy repository
Install `Easy Extension Framework` as explained in the [documentation](https://sap.github.io/easy-extension-framework/install-for-existing-setup.html).

### Configure Local Easy repository
Next you'll have to configure the Git repository where the tutorial extension is stored. If you want to play around locally with the extension we suggest you to create a local easy repository that will simplify and speed up your development.
Follow these [steps](https://sap.github.io/easy-extension-framework/configuring-an-easy-repository-in-backoffice/):
- clone locally the [Easy Extension Sample](https://github.tools.sap/cx-boosters/easy-extension-samples/tree/easy-0.2) repository (branch easy-0.2)
- Login into the backoffice and find the Easy node on the Navigation Tree, open Easy Core, Repositories and click on the + button to create a new "local repository"
![img.png](./images/img.png)
- populate the wizard giving the repo a code, name and the path of your local File System where you've cloned the remote easy-extension-samples repo
![img_1.png](./images/img_1.png)
- Clone locally the [Easy Extension Sample](https://github.tools.sap/cx-boosters/easy-extension-samples/tree/easy-0.2) repository (branch compatible to the installed Easy Extension Framework version. For example: The compatible branch for `v0.x` of Easy Extension Framework is `easy-0.x`).
- Configure it as the Local Repository as explained in the [documentation](https://sap.github.io/easy-extension-framework/configuring-an-easy-repository-in-backoffice.html#configuring-a-local-repository).

### Configure Easy Extension Development Environment
The easy extensions development environment setup is based on [Gradle](https://gradle.org/). Following are the steps to setup the environment:
Expand All @@ -63,7 +49,7 @@ The easy extensions development environment setup is based on [Gradle](https://g
sap.commerce.easy.api.key = 123456

# Path to the hybris home directory on your computer to add SAP Commerce Cloud libraries to your extension
sap.commerce.easy.platform.home= <PATH TO YOUR HYBRIS HOME DIRECTORY>
sap.commerce.easy.platform.home= <PATH TO YOUR HYBRIS PLATFORM DIRECTORY>
sap.commerce.easy.rest.base.url = https://localhost:9002/easyrest
```

Expand Down
Loading

0 comments on commit 3c9fde7

Please sign in to comment.