Inline offer
The inline offer is a UI component, displaying the insurance offers for a specific product. Offers quantity can vary from 1 to 3.
If there is no valid offer for the product, the component will not be displayed.
Component display
With 3 offers
The display is similar with only two offers
Each button represents an Evy offer.

With a single offer for the product
If there's only one offer available, the checkbox will be displayed:

Constructor
The Evy.components.inlineOffer
factory creates new instances of the components. The instances should be then passed to the evy
context object using the addComponents
method.
The factory takes parameters using an object with the following keys.
Parameter | Type | Description |
---|---|---|
product | {productId: string, categoryId: string, price: number} | The product description |
container | string | The CSS selector indicating where to insert the component |
Example
const inlineOffer = Evy.components.inlineOffer({
product: {productId: 'ME24712745', categoryId: '123', price:5000},
container: 'div:nth-child(3) > div'
});
evy.addComponents([inlineOffer]);
Updated 12 days ago