Test adding product coupons to the InLine Checkout
Last updated: 24-Jun-2019
Use theTwoCoInlineCart.card.addCoupons(['COUPON'])
method to apply multiple coupons.
TwoCoInlineCart.products.add({code, quantity, options})
method to prepare your catalog product.TwoCoInlineCart.card.addCoupons(['COUPON'])
method.TwoCoInlineCart.cart.checkout()
method.<a href="#" class="btn btn-success" id="buy-button">Buy now!</a>
window.document.getElementById('buy-button').addEventListener('click', function() {
TwoCoInlineCart.products.add({
code: "74B8E17CC0"
});
TwoCoInlineCart.cart.addCoupons(['CUPON']);
TwoCoInlineCart.cart.checkout();
});
After setting the test mode to add coupons to the InLine Checkout using the above method, your cart should look like this: