P24 Installments Modal¶
This webcomponent is responsible for rendering a modal for P24 installments. It allows to calculate the price of the installments before purchasing the product.
Children of the P24 Installments Modal¶
This webcomponent requires a child with modal-opener slot attribute which represents a modal opener.
Attributes¶
| Attribute name | Type | Description |
|---|---|---|
| amount (mandatory) | number | Price of a product in minor currency units, for example cents, kopiykas, groszy |
| mode | 'product' or 'basket' | If this webcomponent is placed inside basket, it should be basket mode, otherwise product mode. If not provided it will be set to product. |
Event Bus events¶
This webcomponent listens to one of two events depending on a mode atttribute with the Event Bus:
Example¶
In this example we render a p24-installments-modal on a product page. We get the amount attribute from the global variable amount available on product and bundle page contexts.