Skip to content

Commit cbbc79f

Browse files
committed
Update to SAP Commerce Cloud 2111
commit 34528c4 Author: Markus Perndorfer <[email protected]> Date: Mon Feb 27 09:49:50 2023 +0100 enable all new API endpoints by default commit 1b6bc38 Author: Markus Perndorfer <[email protected]> Date: Mon Dec 12 14:33:08 2022 +0100 update README commit a0a25c4 Author: Markus Perndorfer <[email protected]> Date: Wed Dec 7 17:24:58 2022 +0100 reintroduced ordergmt addon commit 71733b5 Author: Markus Perndorfer <[email protected]> Date: Wed Dec 7 16:15:19 2022 +0100 remove spurious meta tags commit a17fe6c Author: maggielin0 <[email protected]> Date: Wed Dec 7 16:36:24 2022 +0800 enable payment mocks for dev env for branch Update/2211 (#53) * enable payment mocks for local env * enable payment mocks for dev env commit c0ef2ca Author: I506207 <[email protected]> Date: Thu Dec 1 01:24:48 2022 -0500 added spartacussampledata and shifted extension in localextesion.xml commit 0008c48 Author: I506207 <[email protected]> Date: Thu Dec 1 00:28:20 2022 -0500 add gitignore for .DS_STORE commit 807dce1 Author: I506207 <[email protected]> Date: Thu Dec 1 00:28:00 2022 -0500 remove DS_STORE commit 843e175 Author: Andrew Chan <[email protected]> Date: Wed Nov 23 12:48:52 2022 -0500 Update README commit 1fefb3c Author: Andrew Chan <[email protected]> Date: Tue Nov 22 16:34:37 2022 -0500 Update to Spartacus 4.3 commit 7858d0e Author: Andrew Chan <[email protected]> Date: Tue Nov 22 16:33:36 2022 -0500 Remove deprecated extensions, addons
1 parent fbbae6c commit cbbc79f

File tree

1,233 files changed

+38160
-171873
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,233 files changed

+38160
-171873
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# folders/files to always ignore
22
.metadata
3+
.DS_Store
34
**/gensrc
45

56
#IDE files

README.md

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1+
# SAP Commerce Cloud Sample Repository
2+
13
[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/cloud-commerce-sample-setup)](https://api.reuse.software/info/github.com/SAP-samples/cloud-commerce-sample-setup)
24

3-
# SAP Commerce Cloud Sample Repository
5+
This sample repository contains the files and folders that are required to set up SAP Commerce Cloud.
46

5-
This sample repository contains the files and folders that are required to set up SAP Commerce Cloud. There are multiple branches covering different scenarios for Commerce Cloud (e.g. project Spartacus, data hub, solr customizations). You can clone/download this repository, checkout the branch of interest and then follow the instructions in the readme to update the example files with your specific details.
6-
The master branch covers a Commerce Cloud sample scenario that is based on the [CX recipe](https://help.sap.com/viewer/a74589c3a81a4a95bf51d87258c0ab15/latest/en-US/f09d46cf4a2546b586ed7021655e4715.html)
7+
> **Note**
8+
>
9+
> There are [different branches](https://github.com/SAP-samples/cloud-commerce-sample-setup/branches)
10+
> covering the various versions and configurations of an SAP Commerce Cloud solution, so make sure
11+
> to choose the right one. You can clone/download this repository, checkout the branch of interest
12+
> and then follow the instructions in the README to update the example files with your specific details.
713
8-
When your files are ready, push them to your SAP Commerce Cloud repository.
14+
This branch covers a **Commerce Cloud 2211** sample scenario that is based on the [CX recipe](https://help.sap.com/viewer/a74589c3a81a4a95bf51d87258c0ab15/latest/en-US/f09d46cf4a2546b586ed7021655e4715.html) with **Spartacus 4.3.x**.
15+
16+
> **Warning**
17+
>
18+
> **Do not** use the deprecated `yacceleratorstorefront` extension and the related
19+
> addons for any new development.
20+
> The deprecated `yacceleratorstorefront` and a few addons are included in this repo *purely for showcase purposes*.
21+
>
22+
> Details: [Deprecation of Accelerator UIs and Older OCC template Extensions](https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/7e47d40a176d48ba914b50957d003804/1f1c6885781a4267a99c5d619d1f1edd.html?locale=en-US)
923
1024
# Requirements
1125

@@ -19,6 +33,7 @@ When your files are ready, push them to your SAP Commerce Cloud repository.
1933
You can find the supported SAP Commerce versions listed in the [Compatibility help topic](https://help.sap.com/viewer/1be46286b36a4aa48205be5a96240672/v1905/en-US/31ac209eb08f41bc92e9bbe5772fb949.html).
2034

2135
# Download and Installation
36+
2237
Not applicable.
2338

2439
# Configuration
@@ -28,11 +43,12 @@ These instructions walk you through the process of cloning the repository and th
2843
The following folders and files are included in the sample repository.
2944

3045
Root level
46+
3147
- `core-customize` folder: The folder that contains all of the folders and files that support Commerce Cloud.
48+
- `js-storefront` folder: A project Spartacus JS Storefront configured with Server Side Rendering (SSR). For more on project Spartacus see [project Spartacus documentation](https://sap.github.io/spartacus-docs/)
3249

3350
`core-customize` folder
3451
- `manifest.json`: The Commerce Cloud manifest.json file, which defines how your code will be built and deployed in the Public Cloud environments. The manifest is set up to leverage [configuration reuse](https://help.sap.com/viewer/1be46286b36a4aa48205be5a96240672/latest/en-US/2311d89eef9344fc81ef168ac9668307.html) to better allow for consistency between local and cloud builds.
35-
- `extensions\yb2bacceleratorstorefront` folder: contains the generated extension for use with the B2B storefront (e.g Powertools) in this Commerce Cloud sample scenario
3652
- `hybris `folder: contains a sample custom folder for storing any custom extensions as well as the config folder for storing local and cloud properties, `localextensions.xml` and any local solr/tomcat configurations
3753
- `other sample manifests`: A collection of tested and verified manifest files that you can use as starting points for your Commerce Cloud environments.
3854

@@ -56,38 +72,44 @@ Clone the sample repository ([instructions can be found here](https://help.githu
5672

5773
In the sample repository, verify that you have the following files in the `core-customize` folder.
5874
- `manifest.json`: This is the manifest.json for Commerce Cloud.
75+
76+
In the sample repository, verify that you have the following files in the `js-storefront` folder.
77+
- `manifest.json`: This is the file that tells Cloud Automation the name and path of the JavaScript storefronts you want to build and deploy
5978

6079
### Push the Commerce Cloud Configuration to Code Repository
6180

6281
Push all the contents from your local machine to the root level of your Commerce Cloud repository.
6382

6483
### Access the Cloud Portal
6584

66-
Log in to the Cloud Portal and verify that your code repository is connected.
85+
Log in to the Cloud Portal and verify that your code repository is connected.
6786

6887
1. From a supported browser, log in to https://portal.commerce.ondemand.com. For more information, see [Accessing the Cloud Portal](https://help.sap.com/viewer/0c2050f6d31f49ddb6eba18509060ae5/latest/en-US/bc745004669445478d0c0505d77e096c.html).
6988
2. Select *Repository* and verify that you are connected to the correct code repository.
7089
3. Find the environments that were provisioned for your subscription.
7190
3. Create a new build.
7291
4. Deploy the build to the environment using the *Initialze Database* option.
7392

74-
You may also wish to see [this video](https://enable.cx.sap.com/playlist/dedicated/116161351/1_6tm85g61/1_df6ptanl) which provides a walkthrough of how to connect your repository, as well as [this video](https://enable.cx.sap.com/playlist/dedicated/116161351/1_6tm85g61/1_9ogbv7hz) which outlines how to build and deploy
93+
You may also wish to see [this video](https://enable.cx.sap.com/playlist/dedicated/116161351/1_6tm85g61/1_df6ptanl) which provides a walkthrough of how to connect your repository, as well as [this video](https://enable.cx.sap.com/playlist/dedicated/116161351/1_6tm85g61/1_9ogbv7hz) which outlines how to build and deploy.
7594

76-
### Final Steps - Validating an example Electronics Storefront
95+
### Final Steps - Validating an example Spartacus Electronics Storefront
7796

7897
Use the Cloud Portal to create a build and then deploy the build to an environment.
7998

80-
1. After the build is deployed, you can find the 'Storefront' endpoint in the *Environments* page of the Cloud Portal listed under *Public Endpoints*.
81-
2. Click on the *Storefront* hyperlink to access the details page for endpoint.
82-
3. Either add an IP Filter Set for your IP address OR change the Base Rule from 'Deny All' to 'Allow All' in order to receive traffic to this example storefront.
83-
4. Save the changes.
84-
5. Click on the URL listed next to the *Storefront* public endpoint. You will receive a server error.
85-
6. In your browser's address, append the endpoint address with */?site=electronics* and reload the page
86-
7. Verify that you see a basic electronics storefront.
99+
See [Build and Deploy your First SAP Commerce Cloud Project](https://www.sap.com/cxworks/article/2589632836/build_and_deploy_your_first_sap_commerce_cloud_project) for all the steps to build and deploy.
100+
101+
After the build is deployed, you can find the 'JS Storefront' endpoint in the *Environments* page of the Cloud Portal listed under *Public Endpoints*.
102+
103+
1. Click on the *JS Storefront* hyperlink to access the details page for endpoint.
104+
1. Either add an IP Filter Set for your IP address OR change the Base Rule from 'Deny All' to
105+
'Allow All' in order to receive traffic to this example storefront.
106+
1. Save the changes.
107+
1. Click on the URL listed next to the *JS Storefront* public endpoint.
108+
1. Verify that you see a basic electronics storefront.
87109

88110
# Limitations
89111

90-
The repository must be a public-facing repository. You cannot use a private repository to host SAP Commerce Cloud configurations.
112+
The repository must be a public-facing repository. You cannot use a private repository to host SAP Commerce Cloud configurations.
91113

92114
# Known Issues
93115

@@ -100,5 +122,7 @@ This repository is provided "as-is"; no support is available.
100122
Find more information about SAP Commerce Cloud Setup on our [help site](https://help.sap.com/viewer/1be46286b36a4aa48205be5a96240672/latest/en-US/76450bc02bdf492689ca5e6d35c670e6.html).
101123

102124
# License
103-
Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE file](https://github.com/SAP-samples/cloud-commerce-sample-setup/blob/master-license-update/LICENSES/Apache-2.0.txt).
104125

126+
Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed
127+
under the Apache Software License, version 2.0 except as noted otherwise in the
128+
[LICENSE file](https://github.com/SAP-samples/cloud-commerce-sample-setup/blob/main/LICENSES/Apache-2.0.txt).
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5+
<classpathentry combineaccessrules="false" kind="src" path="/platform"/>
6+
<classpathentry combineaccessrules="false" kind="src" path="/addonsupport"/>
7+
<classpathentry kind="output" path="bin"/>
8+
</classpath>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
classes
2+
*.class
3+
gensrc
4+
eclipsebin
5+
.DS_Store
6+
.idea/
7+
rebel.xml
8+
target
9+
/bin/
10+
resources/beans.xsd
11+
resources/items.xsd
12+
platformhome.properties
13+
extensioninfo.xsd
14+
build.xml
15+
resources/spartacussampledata/*-*testclasses.xml
16+
resources-lang/touch_impexgen
17+
resources/spartacussampledata/import/contentCatalogs/*ContentCatalog/cms-responsive-content_*.impex
18+
resources/spartacussampledata/import/contentCatalogs/*ContentCatalog/email-content_*.impex
19+
resources/spartacussampledata/import/stores/*/consents_*.impex
20+
resources/spartacussampledata/import/stores/*/user-groups_*.impex
21+
22+
.vscode/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>spartacussampledata</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<!--
3+
[y] hybris Platform
4+
5+
Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
6+
The files in this addon are licensed under the Apache Software License, v. 2
7+
except as noted otherwise in the LICENSE file.
8+
--><!--
9+
All hybris buildcallbacks.xml macrodefinitions:
10+
11+
Build/Documentation
12+
13+
before/after ant macro "clean"
14+
<macrodef name="spartacussampledata_before_clean"/>
15+
<macrodef name="spartacussampledata_after_clean"/>
16+
17+
before/after ant macro "build"
18+
<macrodef name="spartacussampledata_before_build"/>
19+
<macrodef name="spartacussampledata_after_build"/>
20+
21+
before/after ant macro "compile_core" - the core module of the extension
22+
<macrodef name="spartacussampledata_before_compile_core">
23+
<macrodef name="spartacussampledata_after_compile_core">
24+
25+
before/after ant macro "compile_web" - the web module of the extension
26+
<macrodef name="spartacussampledata_before_compile_web" />
27+
<macrodef name="spartacussampledata_after_compile_web" />
28+
29+
Preparing extension
30+
31+
will be called in the beginning of the ant call and only once (also when using multiple
32+
ant targets e.g. ant build yunittest)
33+
<macrodef name="spartacussampledata_only_once_prepare"/>
34+
35+
Creating ear module/production
36+
37+
before/after ant macro "ear"
38+
<macrodef name="spartacussampledata_before_ear"/>
39+
<macrodef name="spartacussampledata_after_ear"/>
40+
41+
before/after ant macro "production" - for hybris server only
42+
<macrodef name="spartacussampledata_before_production" />
43+
<macrodef name="spartacussampledata_after_production" />
44+
45+
JUnit Test
46+
47+
before/after ant macro "yunitinit"
48+
<macrodef name="spartacussampledata_before_yunitinit" />
49+
<macrodef name="spartacussampledata_after_yunitinit" />
50+
51+
before/after ant macro "yunit"
52+
<macrodef name="spartacussampledata_before_yunit" />
53+
<macrodef name="spartacussampledata_after_yunit" />
54+
55+
Distribution package
56+
57+
before/after ant macro "dist" - internal target; only for use when platform is available in source code
58+
<macrodef name="spartacussampledata_after_dist"/>
59+
<macrodef name="spartacussampledata_before_dist"/>
60+
61+
before/after ant macro "dist_copy" - internal target; only for use when platform is available in source code
62+
<macrodef name="spartacussampledata_before_dist_copy"/>
63+
<macrodef name="spartacussampledata_after_dist_copy"/>
64+
65+
--><project name="spartacussampledata_buildcallbacks">
66+
67+
<macrodef name="spartacussampledata_after_build">
68+
<sequential>
69+
<impexGenerate extname="spartacussampledata"/>
70+
</sequential>
71+
</macrodef>
72+
73+
<macrodef name="spartacussampledata_after_clean">
74+
<sequential>
75+
<delete file="${ext.spartacussampledata.path}/resources-lang/touch_impexgen" failonerror="false"/>
76+
</sequential>
77+
</macrodef>
78+
79+
<patternset id="spartacussampledata.localization.pattern">
80+
<patternset refid="localization.defaultpattern" />
81+
<exclude name="**/*.impex"/>
82+
</patternset>
83+
84+
<macrodef name="spartacussampledata_before_ear">
85+
<sequential>
86+
87+
<!-- you can do anything before the EAR file is being packed -->
88+
89+
</sequential>
90+
</macrodef>
91+
92+
</project>
93+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<!--
3+
[y] hybris Platform
4+
5+
Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
6+
The files in this addon are licensed under the Apache Software License, v. 2
7+
except as noted otherwise in the LICENSE file.
8+
--><extensioninfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="extensioninfo.xsd">
9+
10+
<extension abstractclassprefix="Generated" classprefix="Spartacussampledata" description="spartacussampledata extension" managername="SpartacussampledataManager" managersuperclass="de.hybris.platform.jalo.extension.Extension" name="spartacussampledata">
11+
12+
<!-- you should add all required extensions to this list, except platform extensions which are automatically required -->
13+
14+
<requires-extension name="addonsupport"/>
15+
16+
<coremodule generated="true" manager="de.hybris.platform.jalo.extension.GenericManager" packageroot="de.hybris.platform.spartacussampledata"/>
17+
18+
19+
<meta key="classpathgen" value="false"/>
20+
21+
</extension>
22+
23+
</extensioninfo>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
[y] hybris Platform
3+
4+
Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
5+
The files in this addon are licensed under the Apache Software License, v. 2
6+
except as noted otherwise in the LICENSE file.
7+
-->
8+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
10+
<modelVersion>4.0.0</modelVersion>
11+
<groupId>de.hybris.platform</groupId>
12+
<artifactId>spartacussampledata</artifactId>
13+
<version>18.08.0-SNAPSHOT</version>
14+
15+
<packaging>jar</packaging>
16+
17+
<dependencies>
18+
</dependencies>
19+
</project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -----------------------------------------------------------------------
2+
# [y] hybris Platform
3+
#
4+
# Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
5+
# The files in this addon are licensed under the Apache Software License, v. 2
6+
# except as noted otherwise in the LICENSE file.
7+
# -----------------------------------------------------------------------
8+
# you can put key/value pairs here.
9+
# Use Config.getParameter(..) to retrieve the values during runtime.
10+
11+
spartacussampledata.key=value
12+
13+
# Specifies the location of the spring context file added automatically to the global platform application context.
14+
spartacussampledata.application-context=spartacussampledata-spring.xml
15+
16+
website.electronics-spa.http=http://localhost:4200
17+
website.electronics-spa.https=http://localhost:4200
18+
media.electronics-spa.http=http://localhost:9001
19+
media.electronics-spa.https=https://localhost:9002
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# -----------------------------------------------------------------------
2+
# [y] hybris Platform
3+
#
4+
# Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
5+
# The files in this addon are licensed under the Apache Software License, v. 2
6+
# except as noted otherwise in the LICENSE file.
7+
# -----------------------------------------------------------------------
8+
#
9+
# Import the German CMS content for the Apparel Site DE
10+
#
11+
12+
\$contentCatalog=apparel-deContentCatalog
13+
\$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=\$contentCatalog]),CatalogVersion.version[default=Staged])[default=\$contentCatalog:Staged]
14+
\$siteResource=jar:de.hybris.platform.spartacussampledata.constants.SpartacussampledataConstants&/spartacussampledata/import/contentCatalogs/\$contentCatalog
15+
\$picture=media(code, \$contentCV)
16+
#set( $escContentCV=$esc.java('$contentCV[unique=true]') )
17+
18+
# Language
19+
\$lang=$lang.toLowerCase()
20+
21+
# CMS Link Components
22+
#set ($data = $query.load('cms-responsive-content', 'CMSLinkComponent') )
23+
UPDATE CMSLinkComponent;$escContentCV;uid[unique=true];linkName[lang=$lang]
24+
#foreach( $row in $data )
25+
;;$row.key;"$row.values.linkName"
26+
#end
27+
28+
# Site Logo Media
29+
INSERT_UPDATE Media;$escContentCV;code[unique=true];realfilename;@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator];mime[default='image/jpeg'];folder(qualifier)[default='images'];altText
30+
;;/images/theme/SAP_scrn_R.png;SAP_scrn_R.png;\$siteResource/images/theme/SAP_scrn_R.png;image/png;;"SAP Commerce"
31+
32+
# Site Logo Component
33+
#set ( $logobannercomponent = $query.load('cms-responsive-content', 'LogoSimpleBannerComponent') )
34+
UPDATE SimpleBannerComponent;$escContentCV;uid[unique=true];$escPicture
35+
#foreach( $row in $logobannercomponent)
36+
;;$row.key;$row.values.picture
37+
#end

0 commit comments

Comments
 (0)