0
Je me demande comment je pourrais passer une variable dans la fonction simpleCart pour différents liens de caisse en fonction du bouton qui est pressé.simpleCart.js URL dynamique dans Javascript
Boutons:
$('.paypal_checkout').on('click', function(){
window.checkoutlink = 'http://url.com/paypal';
simpleCart.checkout();
return true;
});
$('.stripe_checkout').on('click', function(){
window.checkoutlink = 'http://url.com/stripe';
simpleCart.checkout();
return true;
});
SimpleCart:
simpleCart({
checkout: {
type: "SendForm" ,
url: checkoutlink ,
}
});