Sei sulla pagina 1di 25

http://erpcertificationmaterials.

com/

M
Welcome to

hybris
Commerce
Developer Training -
Parti

http://erpcertificationmaterials.com/
e
http://erpcertificationmaterials.com/

Some Necessities

Participant List

USB Sticks

Personal Introduction M

hybris Trainer
Personal Introduction
hybris.trainer@ hybris.com

Name

Role Spring/JEE
Project experience

Company
Previous hybris
experience
Hobbies provide feed b ack at
www.surveymonkey.com/r/trainer name

Introduction 11-4

2 H Y400 © h ybris, A n S A P C o m p a n y

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

Training Content

This course consists of two parts:


• In-class lectures
• illu s tra te th e th e o ry b e h in d c o re fu n c tio n a lity a n d m a in c o n c e p ts o f th e h yb ris
A c c e le r a to r a n d P la tfo rm

• d e m o n s tra te th e s o ftw a re

• g iv e a n id e a o f w h a t’s a v a ila b le o u t-o f-th e -b o x a n d w h a t h a s to b e im p le m e n te d

• Instructor-led exercises
• g iv e y o u a c h a n c e to w rite a “h e llo w o rld ” fo r e a c h a r e a p re s e n te d

• a n s w e r y o u r q u e s tio n s a n d a s s is t yo u w ith th e la b e x e rc is e s

• It will not cover the following topics:


• h y b ris C o m m e r c e o r W C M S
- for that, we offer hybris Developer Training, part II

S y s te m A d m in is tra tio n
- for that, we offer hybris System Administrator Training

• C u s to m e r-s p e c ific p ro b le m s

Instructor-Led Hands-On M

• The exercises for this class are based on the hybris Accelerator
• You will create an Accelerator-based Bookstore
• The labs instructions are high-level. You will develop the design provided
by referring to the lectures and documentation.
• Are you stuck in a lab?
• Please ask the instructor during the class

Introduction | 1-6

© h ybris, A n S A P C o m p a n y HY400 3

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

Training Requirements M

• Laptop or personal computer

• 64-bit Windows, Linux or Mac-OS X

• Minimum 8 GB of RAM available

• Administrator Rights

• One or more free USB Slots

• Latest Java 8 (Oracle JDK)


• O nly from 5.5.1

• An IDE (we provide pre-configured STS)

Introduction | 1-7

Working Hours - Day 1

9:00 1. Overview

2. Installing the hybris Accelerator


J

r \
Day 1 12:30 1. Exercise 1 - Installation

Lunch

13:30 1. Exercise 1 - Installation


\___________________________________ )

3. Data Modeling

^______________________________________________________________________________________ J

17:00

Agenda | 1-8

4 H Y400 © h ybris, A n S A P C o m p a n y

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

Working Hours - Day 2

4. Product Modeling
^_________________________________________________ /

3. Exercise 3 - Product Modeling


Day 2 12:30

Lunch

13:30
5. ImpEx
_________________________________________________ r'
'v

4. Exercise 4 - ImpEx

6. Flexible Search

5. Exercise 5 - Flexible Search

17:00 7. Cache

Agenda | 1-9

Working Hours - Day 3

9:00 8. Services

Day 3

12:30

Lunch

13:30 12. Security

8. Exercise 8 - Security

17:00

Agenda | 1-10

© h ybris, A n S A P C o m p a n y H Y400 5

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

Working Hours - Day 4

9:00
15. BackOffice (Cockpit NG)
L

10. Exercise 10 - BackOffice (Cockpit NG)


12:30
Day 4
Lunch

13:30
r \
16. Event System

17. W eb Services

18. Validation

19. hybris Know-How


V. J
-■

11. Exercise 11 - Validation

Agenda | 1-11

6 H Y400 © h ybris, A n S A P C o m p a n y

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

hybris Platform
and Accelerator
hybris Platform and Accelerator
Architecture

The hybris Platform

• Composed of a standard set of extensions providing base functionality


• Y o u w ill b uild y o u r s ite a to p s ta n d a rd e x te n s io n s , m a in ta in in g a c le a r c o d e a n d
c o n fig u ra tio n s e p a ra tio n

• An extension:
• Is th e p a c k a g in g m e c h a n is m fo r a h yb ris fe a tu re

• C o n ta in s b u s in e s s log ic, ty p e d e fin itio n s , a w e b a p p lic a tio n , e tc .

• Database and application server abstraction layer


• O R M fra m e w o rk

• B uild fra m e w o rk

• C o c k p it fra m e w o rk

• D a ta m o d e lin g , v a lid a tio n a n d im p o rts

• W e b s e rv ic e s

• C o n fig u ra tio n file s

• hybris Server

hybris Platform and Accelerator | 1-14

© h ybris, A n S A P C o m p a n y H Y400 7

http://erpcertificationmaterials.com/
0
http://erpcertificationmaterials.com/

Building a Commerce Site on hybris

hybris is an omni-channel platform


• It interacts with customers over the web, mobile devices, email, kiosks, or via
support reps

• It is connected to product and website content catalogs, inventory and fulfillment


systems, print services, ERPs, etc.

hybris Platform and Accelerator | 1-15

Building a Commerce Site with the hybris Accelerator

• Some hybris customers build their commerce sites from the ground up
• where the ground is the standard hybris platform!

• However, most leverage one of the hybris Commerce Accelerators


• Functional sites that serve as starting points for your development.
Allow you to jum p-start your implementation, shortening your development
time and simplifying maintenance

Each accelerator consists of extension templates


• These templates are copied and renamed using
the moduLegen ant target
• You will directly modify the java and
configuration files in these extensions
to build your site

hybris Platform and Accelerator | 1-16

8 H Y400 © h ybris, A n S A P C o m p a n y

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

Accelerator Features Business User-Focused Cockpits

© h ybris, A n S A P C o m p a n y H Y400 9

http://erpcertificationmaterials.com/
0
http://erpcertificationmaterials.com/

Store and Site Structure in B2C Accelerator

IP. en de
delivery JP. (europe) delivery: UK delivery: (europe)

Electronics Fashion
hybris Platform and Accelerator | 1-19

Architecture

hybris Platform and Accelerator


Architecture

10 H Y400 © h ybris, A n S A P C o m p a n y

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

Architecture Overview M
Client Back Office

Touch Points Analysis Cockpits back


TcJ i----------- 1 (-------- 1 (-------- 1 office
Spring MVC RESTful iReport Product i Admin WCMS
LU L _________________l '--------------------J I___________ J
WebSvc Widgets
Flex, JSF...
in-Store apps... BiRT... r Report f Print ! i CSC !
L _______________ « i--------------------J L -------------------*

Accelerator
J£Lfl ServiceLayer API WebService API VirtualJDBC API RESTful WS
<
P aym ent I Prom otion I W orkflow CMS C ore+ Svcs
l2

Core Platform (*}


E B usiness Services (Classification, Catalog, price Calculation,...)
0
i-
H- Infrastructure Services (Authentication, User, i18n,...)
Core+
1 Platform
a. System S ervices (Session, Model, Tenant, Cluster,...)

C o re P ersistence Fram ew ork C ore+ PF

i
| | | W hybris se rve r 0 fm ? tc S erver == 1Odfrl^che
Tomcat
i

“ ^ V hana O R A C L E '
Mitrowtf
SQL Serverioos &
MySQL.
PERCONA
Server %mongo DB
Accelerator Architecture | 1-21

Modes of operation

You can run the hybris Commerce Suite in three different modes of
operation
• Single Node

Accelerator Architecture | 1-22

© h ybris, A n S A P C o m p a n y H Y400 11

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

Modes of operation

• Cluster

db f ~j
Accelerator Architecture | 1-23

Cluster environment - Rolling Update

A rolling update allows you to update your cluster one node at a time
• Helps eliminate cluster downtime during a system update
• Each node has to be updated and restarted in sequence

Accelerator Architecture | 1-24

12 H Y400 © h ybris, A n S A P C o m p a n y

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

Modes of operation (0

• Multi-tenant

© h ybris, A n S A P C o m p a n y H Y400 13

http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

Installing the
hybris
Accelerator

hybris C om m erce
D eveloper Training
-P a rti

SAP M
H Y400 © h ybris, A n S A P C o m p a n y

http://erpcertificationmaterials.com/
0
http://erpcertificationmaterials.com/

Build Framework

• The hybris Platform has a build framework based on Apache Ant


• Ant handles compilation and a number of automation tasks
• Class executables compiled by the Eclipse IDE are not used by hybris

• There is a build file in every extension, but we generally just use the
one in the platform extension, which builds the entire suite

• It builds every extension listed or referred to by


localextensions.xml

Build Framework | 2-4

© h ybris, A n S A P C o m p a n y H Y400 15

http://erpcertificationmaterials.com/
0
http://erpcertificationmaterials.com/

Instructions for hybris Commerce Developer Training - Part I

Introduction
The hybris Education Team welcomes you to the hybris Commerce Developer Training. This training will help
you better understand, and remember basic hybris concepts such as data modeling, CronJobs, and security.

You can follow this training up to the end of exercise 1 online. There are demos and instructions provided for
you which will guide you through until that point. From exercise 2, in each exercise, our trainer will present
you with the theory you need in order to understand the concept behind it, and then you will have the
instructions online explaining the exercise.

The exercises will have you build a bookstore. Yes, Amazon.com is already worried! Your store will not only
sell, but rent books. Your customers will accumulate reward points that they can use for future rentals. Get
them hooked, and get them hooked early!

The aim of the exercises is to help familiarize you not only with the core features of the hybris Commerce
Suite, but also with tools in the suite and best practices. You will be writing your own code, rather than
cut-and-pasting code fragments. The bookstore will serve to frame these exercises into a coherent whole,
built atop the hybris Accelerator. The Accelerator is a set of extension templates many of our customers use
as a starting point for their sites, and we use it as the basis for your bookstore. You will create
Accelerator-based extensions, following a best-practice, layered approach, extend the data model, localize
your data, configure a catalog, set up import/export of its data, etc. Exciting stuff!

To facilitate a hands-on approach, we provide an automated tool that prepares the environment for each exercise. The Training Labs Tool, based
on Ant, can also verify your solutions; furthermore, if you were unable to complete an exercise, the tool copies in the solution, allowing you to
proceed to the next exercise.

Training Labs Tool

This automated tool both sets the groundwork for working on an exercise, and allows you to verify your solution. The core of this tool is an Ant file,
which defines targets for all the tool's activities. For each exercise, other that the first one, you will invoke an Ant target to prepare the
environment; then go solve it. There are also Ant targets for each exercise that overwriteyour solution with our correct one — you should use this
only if you wish to move on to the next exercise without completely finishing the current one. The tool also provides groovy scripts to verify your
solution at every step (of course, only for those parts of the solution we can verify automatically).

Exercises

The exercises will lead you through the development of a simple bookstore. You will write Java code, create and modify configuration files,
configure import/export (ImpEx) files, and learn to use the hybris tools: the hybris Administration Console (hAC), Management Console (hMC),
backoffice, and administration cockpit.

The first exercise simply covers the installation of the hybris Accelerator. In the exercises that follow, you will
develop and configure the accelerator to meet the requirements of our bookstore.

Verification

You can verify the solution that you develop for each exercise by invoking a groovy script provided by the tool. The scripts are imported into the
commerce suite by the S ta rt_ th e _ T ra in in g Ant task. Although verification scripts are meant to check your solutions programmatically, in a few

H Y400 http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

cases it's not possible for us to provide automated verification. In such cases, you should verify the solution manually.

Contents
• Introduction
• Training Labs Tool
• Exercises
• Verification
• Prerequisites
• Installing Java
• Installing IDE (Eclipse)
• Exercise 1 - Installation
• Goal
• Instructions
• 1.1 Installing the hybris Accelerator
• 1.2 Generating New Storefront Based on the hybris Accelerator
• 1.3 Development Environment Setup
• Verify
• Recap
• Exercise 2 - Data Modeling
• Goal
• Instructions
• Preparation
• Exercise 2.1
• Exercise 2.2
• Exercise 2.3
• Exercise 2.4
• Update hybris
• Verify
• Recap
• Exercise 3 - Product Modeling (Classification)
• Goal
• Instructions
• Preparation
• Exercise 3.1
• Exercise 3.2
• Exercise 3.3
• Exercise 3.4
• Verify
• Recap
• Exercise 4 - ImpEx
• Goal
• Instructions
• Preparation
• Exercise 4.1
• Exercise 4.2
• Exercise 4.3
• Verify
• Recap
• Exercise 5 - Flexible Search
• Goal
• Instructions
• Preparation
• Exercise 5.1
• Exercise 5.2
• Exercise 5.3
• Exercise 5.4
• Exercise 5.5
• Verify
• Recap
• Exercise 6 - Services
• Goal
• Instructions
• Preparation
• Exercise 6.1
• Exercise 6.2
• Exercise 6.3
• Verify
• Recap

EX -2 H Y400 http://erpcertificationmaterials.com/
© h ybris, A n S A P C o m p a n y

0
http://erpcertificationmaterials.com/

• Exercise 7 - CronJobs
• Goal
• Instructions
• Preparation
• Exercise 7.1
• Exercise 7.2
• Verify
• Recap
• Exercise 8 - Security
• Goal
• Instructions
• Preparation
• Exercise 8.1
• Exercise 8.2
• Verify
• Recap
• Exercise 9 - Workflow
• Goal
• Instructions
• Preparation
• Exercise 9
• Verify
• Recap
• Exercise 10 - BackOffice (Cockpit NG)
• Goal
• Instructions:
• Preparation
• Exercise 10.1
• Exercise 10.2
• Verify
• Recap
• Exercise 11 - Validation
• Goal
• Instructions
• Preparation
• Exercise 11.1
• Exercise 11.2
• Verify
• Recap

Prerequisites
These are the necessities!

The Accelerator training is very intensive so in order to participate in it e v e ry s tu d e n t m u st h ave jav a an d ID E in s ta lle d :

• Installing Java
• Installing IDE (Eclipse)

Installing Java
If you do not have a JDK installed, download the latest version of J D K 8 - 64 b it from Oracle.

1. Select the JDK you require and follow the installation instructions
2. If not already done, set your JAVA_HOME environment variable to point to the JDK directory
3. Open a command line and type ja v a c -v e rs io n . You should see something similar to

H Y400 http://erpcertificationmaterials.com/
http://erpcertificationmaterials.com/

M U C M 3 2 3 9 1 7 8 4 A $ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-bl4)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
Figure: Java Version in Console

For a list of other system requirements, please refer to System Requirements - Release 5.4.

Installing IDE (Eclipse)


We provide you with an IDE called STS which is essentially Eclipse IDE tuned for using Spring. Nevertheless, you can use any IDE you like, if you
don't know which one then please follow the following steps that will help you to install eclipse:

Java and Eclipse have to be for same platform, either both x64 or both x32

1. Download Eclipse from the Elipse download site (selecting the Java EE version) or STS from Springsource.
2. Increase the memory allocated to the JVM
• In your eclipse.ini file (this is beside the eclipse executable), replace -Xmx256m with -Xmx1024m
or
• start eclipse without modifying the ini with the following command (Adjust path to your needs first)

C:/Hybris/development/eclipse/eclipse.exe -vm
C:/hybris/development/jdkl.7.0_17/bin/javaw.exe -vmargs -Xms256m -Xmxl024m

Back to Contents

Exercise 1 - Installation

Goal
In this exercise, you are going to setup your first storefront based on the hybris Accelerator.

You will install, configure, and import its projects into an IDE.

Instructions
In case you have not installed java on your machine, here are the instructions. The hybris Commerce Suite and the Spring Source Tool (STS) will
be provided to you on a USB stick at the start of the training. STS is an Eclipse-based IDE well-suited to implement Spring-based applications.

Please note that if you are using IntelliJ you have to execute training ant targets like the 'preparation' from the command line - otherwise
your target will fail. It's because IntelliJ cant resolve hybris project dependencies correctly.

Hence we strongly recommend using the pre-configured STS for better training experience.

Now you should follow the instructions of the following three sub-exercises.

http://erpcertificationmaterials.com/
0
http://erpcertificationmaterials.com/

J a v a 1.8
Note that the hybris platform currently runs on Java 1.8. If you have other versions installed, your IDE might be configured to compile
and run using a version other than 1.8. Change the settings of your IDE so that it uses Java 1.8.

It's a long exercise, but

p lease pay attention to each and every step!


1.1 Installing the hybris Accelerator

1. Unzip the content of h y b ris C o m m e rc e D e v T ra in in g P a rt1 .zip into a new directory, which we will refer to as Y O U R P A T H from now on. If
you're using Windows, make sure you unzip the suite in a directory close to the root path, and without spaces in the name; for example C
:\train in g . (Windows has a maximum path length of 256 characters, and both the STS IDE and the hybris platform contain files whose
total path lengths are close to that value, so please unzip to a directory as close to the drive root as possible.)
2. Set up Ant - open a terminal window and navigate to Y O U R P A T H /w o rk s p a c e /h y b ris /b in /p la tfo rm and execute:
. ./s e ta n te n v .s h (on OSX or Linux) or s e ta n te n v .b a t (on Windows)

A n t S c rip t on M ac
Please note that the command for executing the script on OSX or Linux begins with two dots separated by a space. This forces
the script to execute in the current shell.

3. While still in the platform folder, execute


ant clean

This will prompt you for a configuration template - press enter to specify the default setting d e v e lo p .

MUCM32391784A:platform d063424$ ant clean


Bui Idfi le : /Users/d863424/hybri s/demo/hybri s-c ommerce-sui te-5.3.0.2/hybris/bin/platform/buiId.xml
[echo /Users/dG63424/hybri s/demo/hybri s- commerce-sui te-5.3.0.2/hybri s/bi n/platform/tomcat/bi n
mkdi r Created di r /Users/d063424/hybri s/ demo/hybris-commerce-sui te-5.3.0.2/hybris/log
mkdi r Created di r /Users/d063424/hybri s/demo/hybris-commerce-sui te-5.3.0.2/hybris/data
mkdi r Created di r /Users/d063424/hybri s/demo/hybri s-commerce-suite-5.3.0.2/hybri s/temp/hybri s
input
i nput ««»« NO CONFIG FOLDER FOUND ****
i nput
i nput No config folder was found at /Users/d063424/hybri s/demo/hybri s-commerce-sui te-5.3.0.2/hybri s/confi g
i nput A “fresh" folder containing basic configuration files and the hybris
i nput demo licence will be created for your convenience,
i nput Please adjust and review the conf iguration files (and license) and
input call 'ant' again. This directory will never be overridden or
i nput touched again. Always use this configuration folder for configuration
i nput of platform, do not change anythi ng within the platform folder.
i nput
i nput Please choose the configuration t emplate.
i nput Press [Enter] to use the default value ([develop], production)

Figure: Choosing Configuration Template

The output should end with B U IL D S U C C E S S F U L in less than 30 seconds.

It will generate (among other things) the c o n fig directory under the h yb ris directory - and as we don't need all the extensions of the
Commerce Suite for training purposes, we will configure our installation to use only the B2C accelerator setup.

C o n fig u ra tio n T e m p la te s
For more information regarding configuration templates, please consult this wiki page: Configuration Templates

4. Overwrite the lo c a le x te n s io n s .x m l file in the c o n fig directory with the content of b 2 c _ a c c _ s ta n d a lo n e _ e x te n s io n s .x m l, located in the
s a m p le c o n fig u ra tio n s directory.

Make sure you copy the correct file, since the one listed first in the directory is the wrong one! If, after overwriting localextensio
ns.xml, it contains any b2b extensions, they you probably selected the incorrect configuration sample (the B2B one). Instead,
make sure you're using the B2C configuration.

5. Open lo c a le x te n s io n s .x m l in a text editor and re m o v e all the extensions starting with "y", such as ''y a c c e le ra to rs to re fro n t1'. These are
template extensions and we won't need them in our lo c a le x te n s io n s .x m l file.

For Any© SAP


S A P /S IBM
E / Oracle - Materials Purchase Visit : www.erpexams.com
H Y400 http://erpcertificationmaterials.com/
OR Contact Via Email Directly At : sapmaterials4u@gmail.com
EX-5
http://erpcertificationmaterials.com/

Also re m o v e all the extensions in the "ext-data" and "ext-addon" sections, such as "app arelsto re" and "add on sup po rt" - these load
sample products, etc.

You should also re m o v e the extension called "c o m m e rces ea rch b ack o ffic e".

Finally add the extension "sprin g in teg ra tio n lib s".

6. Open c o n fig /lo c a l.p ro p e rtie s and add the following entry:

config/local. properties

build.parallel=true

7. That will configure hybris to utilize multiple cores in your machine to build extensions in parallel.

8. Execute

ant a l l in the p la tfo rm directory.

The output should end with B U IL D S U C C E S S F U L in less than 2 minutes.


At this stage we could start hybris and initialize it but let's set up new extensions for our storefront first.

1.2 Generating New Storefront Based on the hybris Accelerator

1. In the platform directory run a n t m o d u le g e n and select accelerator template (just hit Enter), give your module the b o o k s to re name and
package: m y .b o o k s to re

modulegen:
[input]
[input] Please choose a template for generation.
[input] Press [Enter] to use the default value ([accelerator],
b2baccelerator, telcoaccelerator, commercewebservices)
accelerator
[input]
[input] Please choose the name of your module extension. It has to
start with a letter followed by letters and/or numbers.
[input] Press [Enter] to use the default value [training]
bookstore
[input]
[input] Please choose the base package name of your extensions. It
has to fulfill java package name convention. Each extension in the
module will add its name to this package.
[input] Press [Enter] to use the default value [org.training]
m y .bookstore

N am ing
All steps and verification mechanism in this training assume that you have chosen b o o k s to re name and m y .b o o k s to re packa
ge in the above step.

Please don't choose different names for the sake of this training.

After this step you should have 7 new extensions in Y O U R P A T H /w o rk s p a c e /h y b ris /b in /c u s to m directory, that have been adapted to
your project's namespace.
• .../custom/bookstore/bookstorefulfilmentprocess
• .../custom/bookstore/bookstorecore

For Any
E XSAP
- 6 / IBM / Oracle - Materials Purchasem OR ContactHVia
Y 4 0Email
0 Directly A n http://erpcertificationmaterials.com/
At : sapmaterials4u@gmail.com
© hybris, S A P C om pany

0
http://erpcertificationmaterials.com/

• .../custom/bookstore/bookstoreinitialdata
• .. ./custom/bookstore/bookstorefacades
• .. ./custom/bookstore/bookstoretest
• .../custom/bookstore/bookstorestorefront
• .. ./custom/bookstore/bookstorecockpits
2. Follow the instructions from the modulegen output about adding the new bookstore extensions:

But with one exception! Pont add the b o o k s to re te s t extension to localextensions .xml - this extension contains large
data sets, such as storefronts (electronics and apparel), and importing these would significantly lengthen the time needed for
initialization. Removing it from localextensions.xml will save you a lot of time during this training.

(ech o) Next s t e p s :
(ech o]
[ech o) 1) Add yo ur e x t e n s i o n t o y o u r / U s e r s / d 0 6 3 4 2 4 / h y b r 1 s / d e m o / c o m m e r c e - s u i t e - 5 . 4 . 8 . 0 / h y b r 1 s / c o n f 1 g / l o c a l e x t e n s i o n s . x m l
[ech o]
(ech o] <e x te ns 1 on d1 r “ " / U s e r s / d 0 6 3 4 2 4 / h y b r i s /d em o/c om me rc e-s u1 t e - 5 . 4 . 0 . 0 /h y b r 1 s / b i n / c u s t o m / b o o k s t o r e / b o o k s t o r e f u l f i I m e n t p r o c e s s " / >
(e c ho j <ex t e n s i o n di r « " / U s e r s / d 0 6 3 4 2 4 / h y b r i s/ d em o /c o m m er c e- su i t e - 5 . 4 . 0 . 0 / h y b r i s / b l n / c u s t o m / b o o k s t o r e / b o o k s t o r e c o r e " / >
[echo J < e x t e n s i on di r * " / U s e r s / d 0 6 3 4 2 4 / h y b r i s/d e m o /c o m m e r c e - su i t e - 5 . 4 . 8 . 0 / h y b r i s / b i n / c u s t o m / b o o k s t o r e / b o o k s t o r e i ni t i a l d a t a " / >
[ec ho ] <ex t e n s i o n d i r ■ " / U s e r s / d 0 6 3 4 2 4 / h y b r i s / d e m o / c o m m e r c e - s u i t e - 5 . 4 . 0 . 0 / h y b r 1 s / b 1 n / c u s t o m / b o o k s t o r e / b o o k s t o r e f a c a d e s " / >
[ech o] < e x t e n s i on d i r * " / U s e r s / d 0 6 3 4 2 4 / h y b r i s/d e m o /c o m m e r c e - su i t e - 5 . 4 . 8 . 0 / h y b r i s / b i n / c u s t o m / b o o k s t o r e / b o o k s t o r e t e s t " / >
[ech o] < e x te n s 1 o n di r - " / U s e r s / d 0 6 3 4 2 4 / h y b r i s / demo/c o m a e r c e - s u i t e - 5 . 4 . 0 . 0 / h y b r i s / b 1 n / c u s tom/b oo ks t o r e / b o o k s t o r e s t o r e f r o n t “/>
[ech o] <ex t e n s i o n di r « " / U s e r s / d 0 6 3 4 2 4 / h y b r i s / d e m o / c o m a e r c e - s u i t e - 5 . 4 . 0 . 0 / h y b r i s / b i n / c u s t o m / b o o k s t o r e / b o o k s t o r e c o c k p i t s " / >
[ech o]
[ech o] 2) Remove th e f o l l o w i n g e x t e n s i o n s from yo ur / U s e r s / d 0 6 3 4 2 4 / h y b r i s / d e m o / c o m m e r c e - s u l t e - 5 . 4 . 0 . 0 / h y b r i s / c o n f i g / l o c a l e x t e n s i o n s . xml
[ec ho ] y a c c e le ra to rfu lfiIm e n tp ro c e ss,y a c c e le ra to rc o re ,y a c c e le ra to rin i t i a l d a t a , y ac celer a to rfa c a d e s,y a c c e le ra tor t e s t , yaccelerator:
r e f ro n t,y a c c e le ra to rc o c k p i ts
[ech o]
[ech o] 3) Make s u r e t h e a p p l i c a t i o n s e r v e r i s s t o p p e d b e f o r e you b u i l d t h e e x t e n s i o n t h e f i r s t ti m e.
[ech o]
[ech o] 4) P e r f o r m ' a n t ' i n y o u r h y b r i s / p l a t f o r m d i r e c t o r y .
[ech o]
[ech o] 5) R e s t a r t t h e a p p l i c a t i o n s e r v e r
[ech o]
[echo]

BUILD SUCCESSFUL
T o t a l ti me : 2 m i n u t e s 25 s e c o n d s
MUCM32391784A:platform d863424$ []

Figure: modulegen Instructions

3. Add following entries to lo c a l.p ro p e rtie s

hac.webroot=/hac
bookstorestorefront.webroot=
storefrontContextRoot=
webs ite.bookstore.http=http://bookstore:9001
webs ite.bookstore.https=https://bookstore:9002
bookstorestorefront.additionalWebSpringConfigs.b2ccheckoutaddon=\
classpath:/b2ccheckoutaddon/web/spring/b2ccheckoutaddon-web-spring.xml
commerceservices.default.desktop.ui.experience=responsive

This will (among other things) swap the application at the main context, i.e. when you (many steps later) type in the web browser localhos
t:9001/,the bookstore homepage will appear instead of the hybris Administration Console (hAC).
4. To simplify our development with the accelerator, we'll modify your operating system's h os ts file:

Modifying hosts allows hybris to determine which site to send the request to based on the URL.

If you are on a Windows machine, this file is located here: C :\w in d o w s\S ystem 32\d rivers\etc\h o sts

On a Unix machine (Mac or Linux), the file is located here: /e tc /h o s ts

Add the following alias to the hosts file (As the last line of the file)

127.0.0.1 bookstore

A c c e s s to th e h os ts file

For Any© SAP


S A P /S IBM
E / Oracle - Materials Purchase Visit : www.erpexams.com
H Y400 http://erpcertificationmaterials.com/
OR Contact Via Email Directly At : sapmaterials4u@gmail.com
EX-7

0
http://erpcertificationmaterials.com/

A permission issue may prevent you from directly modifying your hosts file. If you have administrator access on your computer,
you may:

On Windows, open notepad (or even better, notepad++) in administrator mode by right-clicking on the application's icon and
selecting "Run as administrator". Then find the hosts file from within the editor and perform the change.

On a Mac orLinuxcomputer,you can edit the file directly in the terminal window with sudo nano /etc/hosts. After
responding to the prompt with your administrator password, save your change with ctrl-0 and quit with ctrl-X. (Of course, you
could also just use vi...)

No A d m in is tra to r rig h ts on y o u r m a ch in e ?
You will have to live with the following uncomfortable workaround - change these properties in the local.properties file:

website.bookstore.http=http://localhost:9001?site=bookstore
webs ite.bookstore.https=https://localhost:9002?site=bookstore

5. Execute a n t all in itia lize -D te n a n t= m a s te r in the platform directory to compile your new extensions with the hybris commerce suite and
initialize it.

It's going to take time (about 6 min) so go for a short coffee break r-

6. Start the server - open a terminal and navigate to Y O U R P A T H /w o rk s p a c e /h y b ris /b in /p la tfo rm and execute:

. /h y b ris s e r v e r. sh (on OSX or Linux) or h y b rls s e rv e r .b a t (on Windows)


Once the commerce suite has started successfully, you'll see an info message in your console saying that the server has started up and
how long it took.
Check the front-end at bookstore:9001/hac/ (if you didn't modify hosts file, use localhost:9001/hac/). You should see the h yb ris
A d m in is tra tio n C o n s o le (h A C ). You can log into it with username a d m in and password n im da.

M hybris adm inistration console

| Remember lo g r

Figure: hybris Administration Console

To check if you have installed the right extensions in your platform, inside hAC, go to Platform and then Extensions. You can then see a
table of extensions that are right now installed in your system.

For Any
E XSAP
- 8 / IBM / Oracle - Materials Purchase OR Contact Via Email Directly
HY400 http://erpcertificationmaterials.com/
At : sapmaterials4u@gmail.com
© hybris, An SAP Company

0
http://erpcertificationmaterials.com/

Q Type here...
M hybris administration console lo g o u t

Platform Monitoring Maintenance

Tenants Configuration System Logging Extensions Initialzation Update SQL Scripts License Support PK Analyzer Classpath)

This page provides the fist i


installed extensions or the I
Show. 50 entries Search: Multichannel Suite You car
Name A Version Core HMC Core* Web following details about eact
extension:
acceleraSCKcms 5.4.00 ✓ ✓ X
• Version
accolerafo"facades 5.4.0.0 ✓ X X
• Contained extension
acceterato'-se'vces 5.4.00 ✓ ✓ X /acceteratorservces module
• Webroot if web extensio
accetorato'storef'ontcommons 5.4.00 ✓ X X module is available
addonsupport 5.4.0.0 ✓ X X • After clicking extension
name, a list of extensior
ad'T- rtcockprt 5.40.0 ✓ X X /admtncockoit depends on displays.

advancedsavedquery 5.4.0.1 ✓ X X
assistodse*vcefacades 5400 ✓ X X Sa* also In tha hybrla Wiki
assistedaervicestorefront 5.4.0.0 ✓ X X
• About Extensions
b2ccneckoutaddon 5.400 ✓ ✓ X
beckoffice 5.4.0.0 ✓ X X /bacxoffice

basacoromerce 5.400 ✓ ✓ X
bookstorecockpits 5.4.0.0 ✓ X X
booksto'eco'e 5.4.00 ✓ ✓ X
bookstorefacades 5.4.0.0 ✓ X X
bookstorefuffiknentprocess 5.400 ✓ X X
booksto'ei "tr.aldala 5.4.0.0 ✓ X X
bookstorestorefront 5.4.00 X X X l

Figure: installed extensions inside hAC

7. Stop the server (Ctrl+C).

1.3 Development Environment Setup

Before doing the exercises, there are some steps that you'll need to take to prepare your development environment.

These steps are:

1. Import the p la tfo rm , co n fig projects together with all the extensions given in lo c ale xte n s io n s .xml-and nothing else-into STS.
Platform and config projects are at Y O U R P A T H /h y b ris /b in /p la tfo rm and Y O U R P A T H /h y b ris /c o n fig respectively. All the other projects
are under Y O U R P A T H /h y b ris /b in /

Path to th e P ro vid ed IDE


The STS provided for you is at Y O U R P A T H /s ts -b u n d le /s ts -3 .6 .3 .S R 1 /S T S .a p p (or S T S .e x e on Windows). Please do n o t rel
ocate the sts-3.6.3.SR1 directory (for example, to C :\P ro g ra m Files, or to /A p p lic a tio n s ).

If you are using your own IDE

- you should also import T ra in in g L a b s T o o l project. It's located at Y O U R P A T H /w o rk s p a c e /T ra in in g L a b s T o o l

- you should configure you IDE to use the Ant provided in the commerce suite. You can find it at Y O U R P A T H /w o rk s p a c e /
hy b ris /b in /a p a c h e -a n t-1 .9.1

HY400 http://erpcertificationmaterials.com/

m
http://erpcertificationmaterials.com/

While importing, make sure that the Copyprojectsintoworkspacecheckbox is n o t checked.


You can find all the projects to import in the following image.

HY400 http://erpcertificationmaterials.com/
0

Potrebbero piacerti anche