Skip to content

P24 Installments Banner

Availability:

  • Product page
  • Bundle page


The p24_installments_banner module is used to render a banner for P24 installments on a product or bundle card.

Module source code

{% set installmentHubSettings = ObjectApi.getInstallmentHubSettings() %}

{% set amount = 0 %}

{% if product_id %}
    {% set product = ObjectApi.getProduct(product_id) %}
    {% set globalPricesSettings = ObjectApi.getProductPricesSettings() %}

    {% set shouldShowNetPrice = globalPricesSettings.showNetPrice and not globalPricesSettings.showGrossPrice %}

    {% set amount = shouldShowNetPrice ? product.price.netValue * 100 : product.price.grossValue * 100 %}
{% endif %}

{% set isOnlinePaymentBannerVisible = paymentPayPoSettings.getOnlinePaymentIsActive() and paymentPayPoSettings.getOnlinePaymentBannerEnabled() %}
{% set isBannerVisible = installmentHubSettings.getIsEnabled() and installmentHubSettings.getIsBannerEnabled() %}

{% if isBannerVisible %}
    <p24-installments-modal amount="{{ amount }}" lazy>
        <div slot="modal-opener">
            <img
                src="{{ installmentHubSettings.getBannerUrl() }}"
                id="p24-installments-button"
                class="link"
            ></img>
        </div>
    </p24-installments-modal>
{% endif %}

Module configuration schema

[]

ObjectApi methods reference

Webcomponents reference