结帐页面上的运费计算器按钮 [英] Shipping calculator Button at Checkout page

查看:28
本文介绍了结帐页面上的运费计算器按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 woocommerce 的新手,对此我了解不多.在一个项目中,我想从购物车页面隐藏运费计算按钮.但想在结帐页面上显示与按钮相同的配置.

I am new to woocommerce and I do not have much knowledge about that. In a project I want to hide shipping calculation button from cart page.but want to show the same configuration with button on checkout page.

我需要有关如何在结帐时添加送货按钮的帮助.

I want help regarding how to add shipping button on checkout.

推荐答案

点击calc_shipping按钮后可以触发事件,但是需要等待原生calc_shipping方法结束.我使用 jQuery(document).ajaxComplete 来等待执行:

you can fire an event after calc_shipping buton is clicked, but you need to wait native calc_shipping method to end. I used jQuery(document).ajaxComplete to wait that execution:

jQuery('[name="calc_shipping"]').click(function () {
jQuery(document).ajaxComplete(function () {
    your_pretty_code;
});

这篇关于结帐页面上的运费计算器按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆