Widget configuration
In order to configure the widget on your custom website, follow the steps below.
Settings
Attribute | Default value | Description | Required |
---|---|---|---|
merchant-token | This field is mandatory. | Yes | |
amount-selectors |
| Array of string selectors to use to find the amount in the DOM. | Yes - or fallback to |
amount | The amount used as fallback if | Only if attribute | |
min-amount | contract min amount | Minimum amount to display the widget. | No |
max-amount | contract max amount | Maximum amount to display the widget. | No |
currency-position |
| Position of the currency, before or after the amount. | No |
currency-display |
| Format of the currency. | No |
locale |
| Language of the widget. | No |
type |
| The widget format. | No |
environment |
| In accordance with the merchant token entered, the environment value can be: | No |
amount-separator |
| The separator before the cents in the amount provided to the widget (e.g. 1500,00 vs 1500.00) | No |
hide-installments |
| Hides the amount of instalments from the widget | No |
hide-learn-more |
| Converts the "learn more" link from product/cart widget to an i icon if set to | No |
alignment |
| Text alignment of the widget, can be either | No |
dark-mode |
| Enables a version of the widget useful for dark backgrounds. | No |
channel | empty | Set this field as | No |
Amount selectors
Add the selector of the product price component to allow the widget to change dynamically: in this way, if the product price changes, the value of the instalments changes.
amount-selectors='["#price-container"]'
For pages that can have multiple prices such as a regular price and a special price, add multiple price selectors separated by a comma ',' and the widget will take as reference the price of the first selector.
amount-selectors='["#price-container .default-price", "#price-container .secondary-price"]'
Amount value
The amount prop is used as fallback ifamount-selectors
prop is not defined.
The value could be the price with or without the currency (e.g.100,00€ , 100.00
).
amount='300,64'
Updated 8 days ago