Connector For SAP Commerce Cloud Manual - CoreMedia Content Cloud

Transcription

COREMEDIA CONTENT CLOUDConnector for SAP Commerce Cloud ManualConnector for SAP Commerce Cloud Manual

Connector for SAP Commerce Cloud Manual Copyright CoreMedia GmbH 2022CoreMedia GmbHLudwig-Erhard-Straße 1820459 HamburgInternationalAll rights reserved. No part of this manual or the corresponding program may be reproduced orcopied in any form (print, photocopy or other process) without the written permission of CoreMediaGmbH.GermanyAlle Rechte vorbehalten. CoreMedia und weitere im Text erwähnte CoreMedia Produkte sowiedie entsprechenden Logos sind Marken oder eingetragene Marken der CoreMedia GmbH inDeutschland. Alle anderen Namen von Produkten sind Marken der jeweiligen Firmen.Das Handbuch bzw. Teile hiervon sowie die dazugehörigen Programme dürfen in keiner Weise(Druck, Fotokopie oder sonstige Verfahren) ohne schriftliche Genehmigung der CoreMedia GmbHreproduziert oder vervielfältigt werden. Unberührt hiervon bleiben die gesetzlich erlaubtenNutzungsarten nach dem UrhG.Licenses and TrademarksAll trademarks acknowledged.August 20, 2022 (Release 2107 )COREMEDIA CONTENT CLOUDii

Connector for SAP Commerce Cloud Manual 1. Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1. Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2. Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3. Change Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1. Commerce Hub Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2. Commerce Hub API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103. Customizing SAP Hybris Commerce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.1. Adding the CoreMedia Extensions to your Hybris Project Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.2. Apply global JSPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.3. Configuring the CoreMedia Fragment Connector . . . . . . . . . . . . . . . . . . . . . . . 173.4. Load Essential Data and Demo Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214. Connecting with an SAP Hybris Commerce System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.1. Configuring the Commerce Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244.2. Shop Configuration in Content Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.3. Check if everything is working . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.4. Configuring Custom Entity Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315. Commerce-led Integration Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.1. Commerce-led Scenario Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345.2. Adding CMS Fragments to Shop Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.2.1. CoreMedia Content Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375.2.2. The CoreMedia Include Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.3. Extending the Shop Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485.4. Solutions for the Same-Origin Policy Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 515.5. Caching In Commerce-Led Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545.6. Prefetch Fragments to Minimize CMS Requests . . . . . . . . . . . . . . . . . . . . . . . 595.7. Link Building for Fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645.7.1. How fragment links are build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645.7.2. Commerce Links for CoreMedia Content . . . . . . . . . . . . . . . . . . . . . 655.7.3. Commerce Links for Studio Preview . . . . . . . . . . . . . . . . . . . . . . . . . . 656. Studio Integration of Commerce Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676.1. Catalog View in CoreMedia Studio Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686.2. Enabling Preview in Shop Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726.3. Commerce related Preview Support Features . . . . . . . . . . . . . . . . . . . . . . . . . . 746.4. Augmenting Commerce Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776.4.1. Augmenting the Root Nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776.4.2. Selecting a Layout for an Augmented Page . . . . . . . . . . . . . . . . . . 786.4.3. Finding CMS Content for Category Overview Pages . . . . . . . . . . 796.4.4. Finding CMS Content for Product Detail Pages . . . . . . . . . . . . . . . 826.4.5. Adding CMS Content to Non-Catalog Pages (OtherPages) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847. Commerce Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888. The eCommerce API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 959. Commerce Adapter Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111COREMEDIA CONTENT CLOUDiii

Connector for SAP Commerce Cloud Manual List of Figures2.1. Hybris Homepage enriched with CMS Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2. Architectural overview of the Commerce Hub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.3. More detailed architecture view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.1. Commerce-led Architecture Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345.2. Commerce-led Request Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345.3. Various Shop Pages with CMS Fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.4. Using the CoreMedia Content Widget - A Homepage Fragment . . . . . . . . . . . . . . 385.5. Using the CoreMedia Content Widget - Connection to CMS Content viaplacement name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385.6. Cross Domain Scripting with Fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515.7. Cross Site Scripting with fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525.8. Example request flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555.9. Multiple Fragment Requests without Prefetching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595.10. LiveContext Settings: Prefetch Views per Placement . . . . . . . . . . . . . . . . . . . . . . . . . 615.11. LiveContext Settings: Prefetching Additional Views . . . . . . . . . . . . . . . . . . . . . . . . . . . 626.1. Library with catalog in the tree view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686.2. Library tree with multiple occurrences of the same category . . . . . . . . . . . . . . . . 696.3. Open Product in tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706.4. Product in tab preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706.5. Open Category in tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716.6. Category in tab preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716.7. Test Customer Persona with Commerce Customer Segments . . . . . . . . . . . . . . . . 756.8. Edit Commerce Segments in Test Customer Persona . . . . . . . . . . . . . . . . . . . . . . . . . 766.9. Catalog structure in the catalog root content item . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786.10. Choosing a page layout for a shop page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 796.11. Category Overview Page with CMS Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806.12. Decision diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816.13. Product detail page with CMS content highlighted by borders . . . . . . . . . . . . . . . 826.14. Page grid for PDPs in augmented category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836.15. Product detail page with CMS assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846.16. Example: Contact Us Pagegrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 856.17. Example: Navigation Settings for a simple SEO Page . . . . . . . . . . . . . . . . . . . . . . . . . 866.18. Special Case: Navigation Settings for the Homepage . . . . . . . . . . . . . . . . . . . . . . . . 877.1. Multiple levels of caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887.2. Commerce Cache Invalidation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907.3. Actuator URLs in overview page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 947.4. Actuator results for cache.timeout-seconds.ecommerce properties . . . . . . . 94COREMEDIA CONTENT CLOUDiv

Connector for SAP Commerce Cloud Manual List of Tables1.1. Typographic conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2. Pictographs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.1. CoreMedia Connector Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.1. livecontext settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.1. CoreMedia Content Widget Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395.2. Attributes of the Include tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.3. Supported usages of the externalRef attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425.4. Fragment handler usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459.1. SAP Commerce Adapter related Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97COREMEDIA CONTENT CLOUDv

Connector for SAP Commerce Cloud Manual List of Examples5.1. Default fragment handler order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.2. ContextProvider interface method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.3. Access the Shop Context in CAE via Context API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.4. AJAX Stub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.5. Effective Dynamic Include URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.6. Commerce URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .COREMEDIA CONTENT CLOUD454849575765vi

Preface 1. PrefaceThis manual describes how the CoreMedia system integrates with SAP Hybris. Chapter 2, Overview [6] gives a short overview of the integration. Chapter 3, Customizing SAP Hybris Commerce [12] describes how you have to configure the commerce system to work with CoreMedia Content Cloud. Chapter 5, Commerce-led Integration Scenario [33] describes the commerce-ledscenario and shows how you extend commerce pages with CMS fragments. Chapter 4, Connecting with an SAP Hybris Commerce System [23] describes howyou connect a CoreMedia web application with a Hybris Commerce system. Section 5.7, “Link Building for Fragments” [64] describes deep links from fragmentsof the CMS system to pages of the Hybris system. Section 6.2, “Enabling Preview in Shop Context” [72] describes how you activate thepreview of Hybris Commerce pages in Studio. Chapter 6, Studio Integration of Commerce Content [67] shows the eCommercefeatures integrated into CoreMedia Studio. Chapter 7, Commerce Caching [88] describes the CoreMedia cache for eCommerceentities. Chapter 8, The eCommerce API [95] describes the basics of the eCommerce API.COREMEDIA CONTENT CLOUD1

Preface Audience1.1 AudienceThis manual is intended for architects and developers who want to connect CoreMediaContent Cloud with an eCommerce system and who want to learn about the conceptsof the product. The reader should be familiar with CoreMedia CMS, , SAP Hybris Commerce,Spring, Maven , Chef and Docker.COREMEDIA CONTENT CLOUD2

Preface Typographic Conventions1.2 Typographic ConventionsCoreMedia uses different fonts and types in order to label different elements. The following table lists typographic conventions for this documentation:ElementTypographic formatExampleSource codeCourier newcm systeminfo startBold, linked with Open the menu entryCommand line entriesParameter and valuesClass and method namesPackages and modulesMenu names and entriesFormat NormalField namesItalicEnter in the field HeadingCoreMedia ComponentsThe CoreMedia ComponentApplicationsUse ChefEntriesIn quotation marksEnter "On"(Simultaneously) pressed keysBracketed in " ", linked with " "Press the keys Ctrl A EmphasisItalicIt is not savedButtonsBold, with square bracketsClick on the [OK] buttonCode lines in code exampleswhich continue in the next line\cm systeminfo \-u userTable 1.1. Typographic conventionsCOREMEDIA CONTENT CLOUD3

Preface Typographic ConventionsIn addition, these symbols can mark single paragraphs:PictographDescriptionTip: This denotes a best practice or a recommendation.Warning: Please pay special attention to the text.Danger: The violation of these rules causes severe damage.Table 1.2. PictographsCOREMEDIA CONTENT CLOUD4

Preface Change Record1.3 Change RecordThis section includes a table with all major changes that have been made after the initialpublication of this manual.SectionVersionDescriptionTable 1.3. ChangesCOREMEDIA CONTENT CLOUD5

Overview 2. OverviewThis manual describes how the CoreMedia system integrates with SAP Hybris Commerce.You will learn how to add fragments from the CoreMedia system into a Hybris generatedsite, how to access the Hybris catalog from the CoreMedia system and how to developwith the eCommerce API. The configuration of your Hybris system is described inChapter 3, Customizing SAP Hybris Commerce [12]CoreMedia Content Cloud offers the commerce-led integration scenario with SAP HybrisCommerce (see Chapter 5, Commerce-led Integration Scenario [33]). In the commerceled scenario, pages are delivered by the SAP Hybris Commerce system. The page navigation is determined by the catalog category structure and cannot be changed in theCMS. You can augment the categories and product detail pages with content from theCMS. Content and settings are also inherited along the catalog category structure.COREMEDIA CONTENT CLOUDIntegration scenarios6

Overview Figure 2.1. Hybris Homepage enriched with CMS ContentCOREMEDIA CONTENT CLOUD7

Overview Commerce Hub Architecture2.1 Commerce Hub ArchitectureCommerce Hub is the name for the CoreMedia concept which allows integrating differenteCommerce systems against a stable API.Figure 2.2, “ Architectural overview of the Commerce Hub ” [8] gives a rough overviewof the architecture.Service 1CommerceAdapter 1Commerce System 1CAE/StudioeCommerce APICommerce Hub ClientService 2CommerceAdapter 2Commerce System 2Figure 2.2. Architectural overview of the Commerce HubAll CoreMedia components (CAE, Studio) that need access to the commerce system include a generic Commerce Hub Client. The client implements the CoreMedia eCommerceAPI. Therefore, you have a single, manufacturer independent API on CoreMedia side, foraccess to the commerce system.The commerce system specific part exists in a service with the commerce systemspecific connector. The connector uses the API of the commerce system (often REST)to get the commerce data. In contrast, the generic Commerce Hub client and theCommerce Connector use gRPC for communication (see https://grpc.io/ for details.Commerce Hub Base er-baseService ImplementationCommerce System Clientvendor-specificCommerce Hub tgRPCretrieves data fromcommerce systemCommerce SystemgRPC Base Implementationvendor-agnosticFigure 2.3. More detailed architecture viewCOREMEDIA CONTENT CLOUD8

Overview Commerce Hub ArchitectureFigure 2.3, “ More detailed architecture view ” [8] shows the architecture in more detail.At the Commerce Hub Client, you only have to configure the URL of the service and someother options, while at the Commerce System Client, you have to configure the commercesystem endpoints, cache sizes and some more features.COREMEDIA CONTENT CLOUD9

Overview Commerce Hub API2.2 Commerce Hub APIThe Commerce Hub API consists of a gRPC API used by the generic client, and a JavaAPI which consists of the Entities API as a wrapper around the gRPC messages, and aJava Feature API, used by the specific adapter services.The gRPC APIThe gRPC API defines the messages and services used for the gRPC communicationbetween generic client and adapter service. It is not necessary to access this API fromany custom code. Access should be encapsulated, using the provided Java APIs, described below. In case the existing feature set does not fulfill all needs for a customcommerce integration, the gRPC API may be extended. CoreMedia provides two samplemodules, showing a gRPC API extension in the Commerce Adapter Mock. Please havea look at the Section 3.2, “CoreMedia Commerce Adapter Mock” in Custom CommerceAdapter Developer Manual.NOTEBy Default the base adapter exposes the gRPC ServerReflection service. It isused by the CoreMedia Commerce Hub Client to obtain available features.The Java APIThe Java API consists of two parts. The first part defines Java Entities as a wrapperaround gRPC. It is used by the generic client and the server in the base adapter.The second part is meant for server side only. It defines the Java Interfaces, called Repositories, the adapter services may implement for any needed feature. This API shouldbe used as an entry point for commerce adapter development.Request flowThe request flow, using the above described APIs, starting from the generic client is asfollows. Please have a look at Figure 2.3, “ More detailed architecture view ” [8] first.1. The generic client sends a gRPC request to the vendor agnostic base adapter. TheEntities API is used to convert the Java entity to the corresponding gRPC message.2. The gRPC service implementation in the base adapter receives the gRPC request andinvokes the corresponding repository methods.COREMEDIA CONTENT CLOUD10

Overview Commerce Hub APIWhile the API definition of the repositories is placed in the base adapter, the implementation which is called here is part of a specific commerce adapter.The commerce adapter uses its vendor specific implementation to obtain the requested data from the commerce system. The data is then mapped to a CoreMediacommerce entity as defined by the base adapter.Finally, the service implementation in the base adapter converts the given entityback to a gRPC response and sends it back to the generic client.3. The generic client receives the gRPC response and uses the Entities API to obtainand process the requested entity.COREMEDIA CONTENT CLOUD11

Customizing SAP Hybris Commerce 3. Customizing SAP HybrisCommerceNOTEOnly required when you want to use the eCommerce Blueprint for HybrisThis section describes how you have to adapt your Hybris project workspace in order tointegrate with CoreMedia Content Cloud.In general, certain configuration files need to be adapted for your Hybris Project Workspace.NOTEDeployment topics are not part of this manual. Please refer to appropriate Hybris documentation at https://help.hybris.comScope of deliveryIn order to connect CoreMedia Content Cloud with your SAP Hybris Commerce systemCoreMedia provides the Workspace for SAP Commerce Cloud archive (Hybris workspacearchive, for short).You will find the Workspace for SAP Commerce Cloud on the CoreMedia releases downloadpage at http://releases.coremedia.com/cmcc-10 in the Commerce Integration section.The customization involves the following aspects:Installation steps Section 3.1, “Adding the CoreMedia Extensions to your Hybris Project Workspace” [14]describes how to add the required CoreMedia Extensions to your Hybris ProjectWorkspace Section 3.2, “Apply global JSPs” [16] describes how to apply customizations to SAPHybris Commerce JSPs outside the CoreMedia Extensions.COREMEDIA CONTENT CLOUD12

Customizing SAP Hybris Commerce Section 3.3, “Configuring the CoreMedia Fragment Connector” [17] describes configuration of the fragment connector, which renders content from CoreMedia ContentCloud as fragments to SAP Hybris Commerce pages. Section 3.4, “Load Essential Data and Demo Data” [21] describes how to initializeessential data and demo data. This also implies the CoreMedia Content Widget, whichis used to add content or assets from CoreMedia Content Cloud to SAP Hybris Commerce pages using the fragment connector.NOTEIn the following sections HYBRIS HOME stands for the Hybris installation directoryof your SAP Hybris Commerce installation and HYBRIS WORKSPACE stands forthe path of your Hybris Project Workspace.COREMEDIA CONTENT CLOUD13

Customizing SAP Hybris Commerce Adding the CoreMedia Extensions to yourHybris Project Workspace3.1 Adding the CoreMediaExtensions to your HybrisProject WorkspaceCoreMedia Content Cloud comes with the Hybris workspace archive Zip file, which hasto be applied to your Hybris Project Workspace. The Hybris workspace archive includesthe following sub folders: The folder cmlivecontext contains an yacceleratorstorefront add-on. It providesthe CoreMedia Content Widget, the CoreMedia Fragment Connector and essentialand demo data. The folder cmoccaddon contains an yacceleratorstorefront add-on. It providesadditional custom OCC controllers to read product and category data, optimized foruse with CoreMedia Commerce Hub. The addon will be used for SAP Hybris 1905. The folder cmocc contains a commercewebservices extension. It replaces thepreviously necessary cmoccaddon and complies with the new SAP Hybris standardsince version 2005. It provides additional custom OCC controllers to read product andcategory data, optimized for use with CoreMedia Commerce Hub. The folder versions contains for each supported Hybris version a dedicated folder YOUR VERSION/custom which contains configuration and JSP tags, whichneed to be applied to other extensions of the Hybris Project Workspace. Use the YOUR VERSION folder corresponding to the version you are using. In the followingthe folder will be referred to as the "global files folder". If your concrete minor versionis not included, there is a chance to adapt the affected files for yourself. Start withthe vanilla version of each file and find the right place to add the CoreMedia extensions.They are all marked as "CoreMedia extensions" in the included examples.Steps for your SAP Hybris 1905 workspace:1. Copy the cmlivecontext and cmoccaddon folders to your Hybris ProjectWorkspace below HYBRIS HOME/bin/custom2. Take the file versions/YOUR VERSION/custom/hybris/configlocalextensions.xml from the Workspace for SAP Commerce Cloud and copy allthe extensions marked with a comment of the format !-- CoreMedia required extensions-- into your Hybris localextensions.xml file.3. Register the add-ons provided by CoreMedia and rebuild the workspace with the following commands:# cd HYBRIS HOME/bin/platform# . ./setantenv.shCOREMEDIA CONTENT CLOUD14

Customizing SAP Hybris Commerce Adding the CoreMedia Extensions to yourHybris Project Workspace# ant addoninstall -Daddonnames front "yacceleratorstorefront"# ant addoninstall -Daddonnames "cmoccaddon"-DaddonStorefront.ycommercewebservices "ycommercewebservices"# ant clean allSteps for your SAP Hybris 2005 workspace:1. Copy the cmlivecontext and cmocc folders to your Hybris Project Workspacebelow HYBRIS HOME/bin/custom2. Take the file versions/YOUR VERSION/custom/hybris/configlocalextensions.xml from the Workspace for SAP Commerce Cloud and copy allthe extensions marked with a comment of the format !-- CoreMedia required extensions-- into your Hybris localextensions.xml file.3. Register the add-ons provided by CoreMedia and rebuild the workspace with the following commands:# cd HYBRIS HOME/bin/platform# . ./setantenv.sh# ant addoninstall -Daddonnames front "yacceleratorstorefront"# ant clean allCOREMEDIA CONTENT CLOUD15

Customizing SAP Hybris Commerce Apply global JSPs3.2 Apply global JSPsThe global files folder of the Hybris workspace archive contains JSPs, which are not partof the CoreMedia extensions. They need to be applied to the yacceleratorstorefront. Thefolder layout underneath the global files folder reflects the layout of the Hybris ProjectWorkspace.For example you can find a customized version of the master.tag in the Workspacefor SAP Commerce Cloud below HYBRIS WORKSPACE/versions/YOUR esponsive/template/master.tag whereas the path to the original master.tag in yourHybris Project Workspace is HYBRIS /master.tag .NOTEIn principle, you can copy the contained content on top of your Hybris Project Workspace,but CoreMedia recommends merging the changes manually with the original files. Ifyou have done customizations before, you have to merge manually.The customized CoreMedia JSP files reflect the CoreMedia default setup. If your ownsetup is different, you have to adapt the slots to your needs. For example, add additionalslots at other locations as it is done in the examples.COREMEDIA CONTENT CLOUD16

Customizing SAP Hybris Commerce Configuring the CoreMedia Fragment Connector3.3 Configuring the CoreMediaFragment ConnectorThe CoreMedia Fragment Connector is the central component in the commerce-led integration scenario (see Chapter 5, Commerce-led Integration Scenario [33]).The CoreMedia Fragment Connector is the component that connects with CoreMediaCAE to load CoreMedia content fragments into store pages. Configure the connector inthe configuration file HYBRIS HOME/bin/custom/cmlivecontext/project.properties , as described below:Configure at least the parameter com.coremedia.fragmentConnector.liveCaeHost with the host URL of your Content Application Engine. If you usea single SAP Hybris Commerce Server that should be able to connect to both, previewand production CAE, you also need to set com.coremedia.fragmentConnector.previewCaeHost with the host URL of the preview CAE. In case you have adedicated staging server with separate production system, you only need to configureone CAE host, for each.Find the meaning of all parameters in the configurati

1. Preface This manual describes how the CoreMedia system integrates with SAP Hybris. Chapter 2, Overview [6] gives a short overview of the integration. Chapter 3, Customizing SAP Hybris Commerce [12] describes how you have to con- figure the commerce system to work with CoreMedia Content Cloud. Chapter 5, Commerce-led Integration Scenario [33] describes the commerce-led