The Sign in with Klarna feature is included in the Klarna Add-on, so no separate installation is necessary. However, a clean build of the package and an update of the database schema are required to generate new data models and data transfer objects (DTOs).
Before proceeding, ensure the following:
HYBRIS_HOME/bin/custom
and HYBRIS_HOME/config
folders.master.tag
file<HYBRIS_HOME>\bin\modules\baseaccelerator\deprecated\yacceleratorstorefront\web\webroot\WEB-INF\tags\responsive\template\master.tag
<jsp:doBody/>
:<c:if test="${isKlarnaSignInEnabled}">
<input type="hidden" id="currentLocale" name="currentLocale" value="${currentLocale}"/>
<input type="hidden" id="clientId" name="clientId" value="${klarnaConfigData.credential.clientId}"/>
<input type="hidden" id="environment" name="environment" value="${klarnaConfigData.environment}"/>
<input type="hidden" id="country" name="country" value="${klarnaConfigData.credential.marketCountry}"/>
<input type="hidden" id="scopeData" name="scopeData" value="${klarnaConfigData.siwkConfig.scopeData}"/>
<input type="hidden" id="redirectUri" name="redirectUri" value="${klarnaConfigData.siwkConfig.redirectUri}"/>
<input type="hidden" id="buttonTheme" name="buttonTheme" value="${klarnaConfigData.siwkConfig.buttonTheme}"/>
<input type="hidden" id="buttonShape" name="buttonShape" value="${klarnaConfigData.siwkConfig.buttonShape}"/>
<input type="hidden" id="buttonLogoAlignment" name="buttonLogoAlignment" value="${klarnaConfigData.siwkConfig.buttonLogoAlignment}"/>
login.tag
file<HYBRIS_HOME>\bin\modules\base-accelerator\deprecated\yacceleratorstorefront\web\webroot\WEB-INF\tags\responsive\user\login.tag
<form:form action="${action}" method="post" modelAttribute="loginForm">
segment, directly below the <ycommerce:testId code="loginAndCheckoutButton">
segment:<c:if test="${isKlarnaSignInEnabled}">
<br>
<div id="klarna-signin-container" style="overflow:auto"><sec:csrfInput/>
</div>
<c:set var="signinErr"><spring:message code="klarna.signin.error"/></c:set>
<input id="signinErrHidden" type="hidden" value="${signinErr}"/>
<div id="klarna-signin-err" title="Klarna Error Message"><span></span>
HYBRIS_HOME/bin/platform
directory.ant clean all
hybrisserver.bat
F4
to open the advanced mode menu.F4
again to return to normal Backoffice mode.openid
, offline_access
, profile_name
, profile_email
, profile_phone
, profile_billing_address
Attribute | Mandatory | Description |
Code | Yes | Input any name/code. This will be the internal reference used to recognize and manage Sign in with Klarna configuration within SAP Commerce. |
Scope | openid, offline_access, profile_name, profile_email, profile_phone, profile_billing_address, profile_country, payments_create_session, profile_national_id | Select Scope to get the information of the user. Mandatory to select (openid ,offline_access, profile_name, profile_email, profile_phone) |
Active | Yes | Check to activate Sign in with Klarna configuration; leave unchecked for it to remain inactive. |
Redirect URL | Yes | This is for redirection in case the storefront is accessed from mobile devices. |
Placements | Yes | Multi select option to show the button in Login Page and Checkout Login Page. |
Theme | No | Color theme of the Sign in with Klarna button: default/light/dark |
Button Shape | No | Shape of the Sign in with Klarna button: Default, Rect, pill |
Button Alignment | No | Button Logo Alignment: Left, Right, Center |