当我选择“货到付款”选项时,我想运行Ajax,我如何才能进入step = payment_method shopify
我试试这个
$('input[type=radio][name="checkout[payment_gateway]"]').change(function(e) {
$(".step__footer__continue-btn").on("click", function(e) {
//we got only cod here
var textAppend= $("#payment_gateway_id").val();
var gateway = $.trim($('.section--payment-method [for="checkout_payment_gateway_'+$("#payment_gateway_id").val()+'"]').clone().children().remove().end().text());
console.log('value of radio' + gateway);
if (gateway == "Cash on Delivery (COD)" || gateway == "Cash on Delivery") {
if (window.PClevel !== true) {
//my code
}
}
});
});
答案 0 :(得分:0)
我非常确定您不能在这样的结帐过程中运行自己的Javascript。我当然可能错了,但是您是否已经证实这是可能的?首先如何将JS代码添加到结帐?