Hybris B2B Unit Selector Addon

Hybris B2B Unit Selector Addon

Published on January 8, 2019 – See the original post here.

OVERVIEW:

The Hybris data model supports B2B customer assignment to multiple B2B units. The B2B Accelerator, however, does not provide an out-of-the-box selector to switch between B2B units on a single login session. This addon will provide a simple B2B Unit Selector as well as the necessary customisations for this to work.

Requirements

  • Hybris Commerce 1808

Features

B2B Customers can have multiple B2B Units

This B2B units selector add-on or AH-Bus lists all the B2B Units assigned to a B2B customer. B2B Units part of a B2B Unit, also known as “descendants”, will be traversed and navigated by customers.

Price Row update upon switch

This add-on allows different B2B Units to have different price groups. When switching between units, the product prices will be updated accordingly to the appropriate price group.

Cost Center specific to a current unit

The default OOTB behaviour lists all Cost Centers available to the Customer. This addon will filter out the Cost Center only relevant to the select B2B Unit and its descendants.


Technical Implementation

The addon can be set up in a few minutes following these simple steps:

1. Checkout b2bunitselectoraddon from the repository
2. Copy b2bunitselectoraddon to {HYBRIS}/bin/custom
3.Add b2bunitselectoraddon to {HYBRIS}/config/localextensions.xml
4.Install the addon via ant under {HYBRIS}/bin/platform

ant addoninstall -Daddonnames=”b2bunitselectoraddon” -DaddonStorefront.yacceleratorstorefront=”{your}b2bstorefront”

5. Run ant all and start the server
6. Update Hybris type system
7. Import the component

$contentCatalog={your}ContentCatalog

$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]

INSERT_UPDATE B2BUnitSelectorComponent;$contentCV[unique=true];uid[unique=true];name;title

;;SelectorComponent;B2B Selector;TEST B2B SELECTOR

INSERT_UPDATE CMSInverseRestriction;$contentCV[unique=true];uid[unique=true];components(uid,$contentCV)

;;loggedInUser;SelectorComponent

8. Add the component to a content slot then Synchronise (Ex: header link slot)

Summary

The AH-Bus addon is basically two pieces with easy setup and readily customizable design in mind.

The addon itself contains the customisations to the B2B Unit Service and the Selector component allows us to add the component to the CMS freely where it can be easily enhanced.

Learn more about how we add value!

Start a Project

X

  • WORK WITH US

    Before we start, please fill this form to provide us some basic information.

  • This field is for validation purposes and should be left unchanged.
X

get product