Set up Qubit on SAP Commerce Cloud

In this article...

We'll cover the steps involved in installing the Qubit add-on in the SAP Commerce Cloud.

Intro

Our add-on provides a pre-integration with the UK Apparel frontend by injecting logic and tags into the yacceleratorstorefront extension or your custom extension based on this.

This add-on is compatible with version 6.5 of the SAP Commerce Cloud. Older versions of the add-on are available for 5.x and 4.x. The add-on may work with later versions but has not been tested so results may not be as expected.

Supported events

The following events are supported by this add-on:

Event

Description

Qubit Package

ecView

Contains information relating to the type of page currently being viewed

Qubit Aura & Qubit Pro

ecUser

Contains information about the current user

Qubit Pro

ecProduct

Contains information about a product. This can be sent in several different situations

Qubit Aura (not all fields) & Qubit Pro

ecBasketItem

Contains information about an item in the basket, including quantity and price. A separate event will be sent for each item in the basket

Qubit Pro

ecBasketItemAction

Sent when a change is made to an item in the basket (added, removed, quantity updated)

Qubit Aura (not all fields) & Qubit Pro

ecBasketItemTransaction

Sent when an order is placed. Contains information about the products ordered

Qubit Aura (Id only) & Qubit Pro

ecBasketSummary

An overall summary of the basket value

Qubit Aura (not all fields) & Qubit Pro

ecBasketTransactionSummary

An overall summary of a placed order

Qubit Aura (not all fields) & Qubit Pro

Installation

The following installation instructions assume that you already have version 6.5 set up and installed with the B2C Accelerator recipe (b2c_acc), any derivative which includes the B2C Accelerator, or an extension based on yacceleratorstorefront.

Step 1

▸ Unzip the provided file. In the resulting directory, copy the sub-directory qubitaddon to your Commerce Cloud installation's bin directory

For example:

{COMMERCE_CLOUD}/bin/custom/qubitaddon

Step 2

▸ Add the following line to {COMMERCE_CLOUD}/config/localextensions.xml:

<extension name='qubitaddon' />

Step 3

▸ Navigate to {COMMERCE_CLOUD}/bin/platform and execute the following command, replacing yacceleratorstorefront with the name of your storefront extension:

ant addoninstall -Daddonnames="qubitaddon" - DaddonStorefront.yacceleratorstorefront=[yacceleratorstorefront]

If no errors are returned, the add-on has been installed to your storefront extension. This will enable the correct tags and population logic to emit Qubit events.

Configuration

There are several configuration properties that can be defined to set up and alter the behavior of the Qubit add-on. These are typically defined in your local.properties file located in {COMMERCE_CLOUD}/config/, although you can also define them in the project.properties file located in the qubitaddon directory.

Refer to the following table for details of these configuration properties:

Property

Expected Value

Description

qubit.enabled

true/false

Enable the Qubit add-on

qubit.emit.events

true/false

If set to false, no events will be sent to Qubit

qubit.tracking.id

String

The Id provided to you by Qubit to uniquely identify your site

qubit.package

Pro/Aura

The package you have purchased from Qubit. This will affect which events are emitted

qubit.smartserve.url

String

The URL of smartserve.js.

This will be provided to you by Qubit

qubit.smartserve.location

Start of HEAD/End of HEAD/End of BODY

The page location to inject smartserve.js

qubit.smartserve.asynchronous

true/false

If set to true, smartserve.js is loaded asynchronously

qubit.namespace

String

Controls the namespace for the event, e.g. yourshop.ev.product would be configured as yourshop

qubit.productlistings.events

true/false

If set to true, events will be emitted on product listing pages

Setting this to true could cause performance issues due to the number of events required for some pages in the Hybris Accelerator. This applies to product listing pages and product references

qubit.productlisting.events.limit

Integer

Maximum number of events per component to send on product listing pages.

Use 'null' to specify unlimited

qubit.productstock.data

true/false

If set to true, stock information is sent with product events.

Setting this to true could cause performance issues due to the need to pull back stock information. Hybris would not normally do this

qubit.sendbasket.events

true/false

If set to true, basket information is sent on every page.

Setting this to true could cause performance issues due to the need to populate basket information on every single page

Notes

  • Installing this add-on will replace your productreferencescomponent.jsp and master.tag files with default accelerator ones, which include Qubit specific logic. If you have already changed this JSP or tag, you will need to save your changes and make them again after installing the add-on
  • The Basket Data event will be sent with slightly out-of-date information if it is sent twice from one page, e.g. two quantities are modified on the same page. This is because Hybris doesn't reload the basket data into the Page DOM. The next page will send the event with the correct data
  • Product Reference events may be sent for the same product multiple times on one page if that product appears in multiple reference components, e.g. you might like and complete your look
  • Once this add-on is installed, it is advisable to either run a system update or initialization, as there is a new attribute, which will be added to Language to support the different ISO standard Qubit uses
Last updated: March 2021
Did you find this article useful?