This guide provides step-by-step instructions to install and configure the Klarna On-Site Messaging (KOSM) add-on for SAP Commerce.
autoFinalize: false
parameter during the authorize call to enable multistep checkout.Note:
Multistep checkout flow:
The collectShippingAddress
parameter governs whether Klarna collects and shares the shipping address:
true
:false
:Note:
Set collectShippingAddress
to true
for a seamless express checkout experience.
KEC does not require a separate installation if Klarna is already integrated. However, ensure:
KlarnaExpCheckoutConfig
table in the database schema.Update the storefront extension files to enable Klarna Express Checkout functionality.
1. Update master.tag
Add the following snippet to load Klarna's script and configure Klarna Express Checkout buttons:
<c:if test="${isKlarnaExpCheckoutEnabled}">
<input type="hidden" name="kecButtonTheme" value="${kecButtonTheme}">
<script src="${fn:escapeXml(scriptUrlKEC)}" async></script>
</c:if>
2. Update productDetailsPanel.tag
Add code to display the Klarna Express Checkout button on the PDP:
<c:if test="${isKlarnaExpCheckoutEnabled}">
<div id="klarna_exp_checkout_container_default">
</div>
</c:if>
3. Update cartDisplay.jsp
and cartPopup.jsp
Embed code for button visibility on the Cart page and Mini Cart:
<c:if test="${isKlarnaExpCheckoutEnabled}">
<div id="klarna_exp_checkout_container_in_cartpopup">
</div>
</c:if>
4. Update acc.checkout.js
Prevent duplicate form submissions by commenting out:
// $('#placeOrderForm1').submit();
1. Navigate to SAP Commerce Backoffice > Klarna > Klarna Express Checkout.
2. Create a new Klarna Express Checkout configuration:
Note:
Ensure active Klarna Payments (KP) configuration exists for the same base store, as Klarna Express Checkout relies on Klarna Payments settings for order creation.
Attribute | Mandatory | Description |
---|---|---|
Code | Yes | Input any name/code. This will be the internal reference used to recognise and manage KEC configuration within SAP Commerce. |
Active | Yes | Check to activate KEC configuration; leave unchecked for it to remain inactive. |
Button Theme | No | Colour theme of the KEC button: default/light/dark |
Button Shape | No | Shape of the KEC button: default/rect/pill |