Assign values for the additional order fields
PreviousTurn on auto-advance featureNextSubscribe / unsubscribe to shopping cart events for InLine Checkout
Last updated
Was this helpful?
Was this helpful?
window.document.getElementById('buy-button').addEventListener('click', function() {
TwoCoInlineCart.cart.setCurrency('USD');
TwoCoInlineCart.cart.setAdditionalFields([
// textbox type example
{
code : 'TextInIPNCustom123',
value : 'Some text value'
},
// listbox type example
{
code : 'SourceOrder',
value : 'The WWW'
},
// hidden type example
{
code : 'cart2cotestorderhidden',
value : 'Some text for the hidden field'
},
// checkbox type example
{
code : 'cart2cotestordercheckbox',
value : true
}
]);
TwoCoInlineCart.products.add({
code: '2CO3MONTHS',
quantity: 1
});
TwoCoInlineCart.cart.checkout();
});