With On-site messaging, banners inform your customers which payment and financing options are available before they reach the checkout page.
The Klarna extension includes the logic thatĀ makes the following adjustments possible:
You can configure the position and design of the placements in Stores > Configuration > Sales > Payment Methods > Klarna > On-site Messaging
Retrieve the identifier for On-site messaging from the Klarna Merchant Portal, where you also can Allowlist your shop domain in the Klarna Merchant Portal, as documented here.
For more information about On-site messaging, refer to the product documentation.
You decide where to display messaging in your store. It can be shown only on the cart page, only on the product detail page, or on both pages.
Tip: If thereās an error, for example, with the API, on messaging wonāt appear until the error is fixed.
Each store can look different and you can choose a design that best matches your store. For example, you can change the width and height of the messaging banner.Ā
The design is predefined on Klarnaās side and the information about it is returned through the API. No manual work is needed except choosing the design.
In Adobe Commerce, you can set a banner theme to override the default or customized content in the shop. For example, based on custom styling, the text font and color can be configured so that the banner fits the current shop theme.
You can customize the banners in the Klarna merchant portal or by editing the CSS code.
To enable the display of Klarna promotional messages in your storefront, perform these steps:
1. In the Adobe Commerce Admin, expand theĀ Klarna On-Site MessagingĀ section.
2. SetĀ EnableĀ toĀ Yes.
3. In theĀ Data client IDĀ field, enter theĀ data-client-idĀ hash value from the code that you copied while in the Klarna merchant portal.
4. Enter theĀ Design themeĀ that you want to apply to Klarna promotional messages. The value, for example, data-theme="dark", can be retreived from the placement code in the Klarna merchant portal.
5. To enable Klarna promotional messaging for product pages, setĀ Enable on productĀ toĀ Yes.
6. To determine the location and style of Klarna promotional messages on the product page, setĀ Product placementĀ to the type of script that you copied from the Klarna merchant portal.
7. The placement value corresponds to theĀ data-keyĀ field in the script you chose. For example, theĀ data-key="credit-promotion-badge"Ā value in the code corresponds to theĀ Credit Promotion - BadgeĀ option. If you have a customized promotion, chooseĀ Other. You will need to provide your own custom script.
8. To enable Klarna promotional messaging for the shopping cart page, setĀ Enable on cartĀ toĀ Yes, and repeat the previous step.
9. When complete, clickĀ Save Config.
If On-site messagingĀ is enabled, do the following to paste the scripts that you copied from the Klarna merchant portal:
1. In the Adobe Commerce Admin, go toĀ MarketingĀ > Design >Ā Configuration.
2. In the list, find the store configuration that you want to update and clickĀ Edit.
3. UnderĀ Other Settings, expandĀ Ā theĀ HTML HeadĀ section.
4. In theĀ Scripts and Style SheetsĀ box, paste each script that you copied from the Klarna merchant portal.
5. ClickĀ Save Configuration.