Settings
Cart Settings are defined in
Vinoshipper.init()
Unlike other Vinoshipper Injector components, settings for the Cart are defined in the initial configuration settings.
cartPosition
cartPosition
Values: 'start'
, 'end'
Default: 'end'
The position of the cart to either the start or end of the viewport window.
start
: Places the button to the โleftโ side of the window.
end
: Places the button to the โrightโ side of the window.
cartButton
cartButton
Type: Boolean
Default: true
Automatically renders the Vinoshipper Cart button.
If false
: the cart button will not render, but the shopping cart HTML will. It will be up to you to call window.Vinoshipper.openCart()
to open the cart UI. See Methods for more information.
Example
The following example sets the cart to the 'start'
position and does not render the default Cart Button.
When the Vinoshipper.openCart()
function is called, the Cart will appear to the "start" side, which for left-to-right languages means the left.
window.document.addEventListener('vinoshipper:loaded', () => {
window.Vinoshipper.init(000, {
cartPosition: 'start',
cartButton: false,
})
}, false);
Updated about 1 year ago