如何在您的 Shopify 店铺中增加货到付款手续费?

尽管有多种方法可以从客户那里收集在线付款,但是货到付款(COD)仍被认为是电子商务领域中最方便、最优选的付款方式。根据各种报道代收货款占在线销售额的近60%。

货到付款统计

如果您使用的是Shopify之类的领先电子商务平台,并希望向客户提供COD作为付款方式,则无需过多考虑,因为该平台允许您启用或禁用“货到付款”作为手动付款方式。但是,它本身不提供任何实现额外收费的货到付款的选择。意味着,您必须通过编写自定义代码来手动完成此操作。在您的帮助下,这是您可以做到的!

向Shopify添加COD手续费的脚本

如果要向Shopify商店添加一些COD手续费,则首先需要编写或复制以下脚本。

<span style="color:#f8f8f2"><span style="color:#eff0f9">window.ShopifyAnalytics.merchantGoogleAnalytics = function(){
  if(document.URL.indexOf('?previous_step = shipping_method&step = payment_method']> = 0){ 
[] .forEach.call(document.querySelectorAll(“。order-summary__section--discount”),function(e){
            e.parentNode.removeChild(e);
        });

[] .forEach.call(document.querySelectorAll(“。applied-reduction-code__clear-button”),function(e){
            e.parentNode.removeChild(e);
        });

[] .forEach.call(document.querySelectorAll(“。field__input-btn-wrapper”),function(e){
            e.parentNode.removeChild(e);
        });     

var shippingMethod = document.getElementsByClassName('review-block__content')[2] .innerText;

if(shippingMethod =='COD·Rs。100.00'){



[] .forEach.call(document.querySelectorAll(“ [data-select-gateway ='127248205']”“),函数(e){
  e.parentNode.removeChild(e);
});

document.getElementById(“ checkout_payment_gateway_130854093”)。checked = true;
document.getElementById(“ checkout_payment_gateway_127248205”)。checked = false;
}



if(shippingMethod =='标准运送·免费'){
    


[] .forEach.call(document.querySelectorAll(“ [data-select-gateway ='130854093']”)),函数(e){
  e.parentNode.removeChild(e);
});

document.getElementById(“ checkout_payment_gateway_130854093”)。checked = false;
document.getElementById(“ checkout_payment_gateway_127248205”)。checked = true;

}
}
};

</span></span>

注意:您可以将shippingMethod ==参数更改为所需的任何值。

将脚本添加到Shopify商店的步骤

请按照以下步骤将上述COD手续费脚本添加到Shopify商店。

第1步:转到商店的“ 设置”页面,然后单击“ 结帐”标签。

步骤1

步骤2:将脚本代码粘贴到给定的框中。

第2步

第3步:现在转到“结帐”页面,您会看到那里开始出现COD手续费。

第三步

就是这样。如果您无法执行此脚本或遇到任何问题,请随时与我们联系

from:https://dev.to//ipraxa/how-to-add-cod-handling-charges-to-your-shopify-store-3kc2

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值