Links

CheckoutModalButton

The "Checkout Modal" allows you to turn any element on your website to a clickable and will give a pop-up widget when clicked, or display as a button anywhere on a page.
Basic Syntax:
window.EMBR.mount({
type: 'CheckoutModalButton',
options: {
checkoutId: '01G5XJ86XCD16HBRFC6BQ1Y6SH',
selector: '#checkout-modal'
}
})
For this type of checkout we need to set it to type : 'CheckoutModalButton'
window.EMBR.mount({
type: 'CheckoutModalButton',
options: {
checkoutId: '01G5XJ86XCD16HBRFC6BQ1Y6SH',
selector: '#checkout-modal'
showLogo: false,
//true by default, set it to false to disable the logo
theme: 'light',
//can be omitted for default, or set to light|dark|custom
cropLogo: false,
/*true by default set to to false of you do not want to have
it round and a white border */
size: 'sm',
// use this to set the size to small. or omit for normal suze
location: 'left',
//default location is right, but you can set it to left|middle
label: 'LabelText',
//name to be displayed
logoUrl: 'Your logo',
//logo to use
backgroundColor: '#ff7900',
//only to use with 'custom'
}
})
all options need to have a "'," in the end EXCEPT the last one.
window.EMBR.mount({
type: 'CheckoutModalButton',
options: {
checkoutId: '01G5XJ86XCD16HBRFC6BQ1Y6SH',
selector: '#checkout-modal',
theme: 'light'
}
})
In the <body> of your HTML code add an ID with the value specified in selector <div id="checkout-Modal"></div>