admin管理员组文章数量:1429638
How do I apply shipping rates based on the cart total? For example:
- If cart total is $0.0 to $9.99 - shipping rate is $5.75
- If cart total is $14.99 to $35.00 - shipping rate is $8.25
- If cart total is $35.01 to $75.00 - shipping rate is $15.50
- If cart total is $75.01 and over - shipping rate is $25.00
How do I apply shipping rates based on the cart total? For example:
- If cart total is $0.0 to $9.99 - shipping rate is $5.75
- If cart total is $14.99 to $35.00 - shipping rate is $8.25
- If cart total is $35.01 to $75.00 - shipping rate is $15.50
- If cart total is $75.01 and over - shipping rate is $25.00
3 Answers
Reset to default 0Try this plugin Advanced Flat Rate Shipping Method WooCommerce.
Hope this helps.
This example seems very close to what your looking for.
- Create your shipping zone
- Setup your shipping methods
- Tell WC when to use each method (or when not to use the others)
This is the example from the site. You will need to rewrite the if statement to fit your needs. This would go in your theme's functions.php file.
add_filter( 'woocommerce_package_rates', 'bbloomer_woocommerce_tiered_shipping', 10, 2 );
function bbloomer_woocommerce_tiered_shipping( $rates, $package ) {
$threshold = 100;
if ( WC()->cart->subtotal < $threshold ) {
unset( $rates['flat_rate:1'] );
} else {
unset( $rates['flat_rate:2'] );
}
return $rates;
}
To change the shipping rate based on the total cart value you need to use table rate shipping method. Here you can add conditions based on cart price along with weight and number of items.
You can use WooCommerce Table Rate Shipping Pro Plugin to set the conditions.
But if you have multiple carrier accounts you can use SaaS-based shipping soluction like StorePep. Where you can set conditions for table rate shipping and let StorePep choose the cheapest shipping carrier available. You can read more about WooCommerce shipping here: https://www.storepep/fedex-shipping-with-woocommerce-using-storepep/
本文标签: WooCommerce apply shipping rates based on price
版权声明:本文标题:WooCommerce apply shipping rates based on price 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745419527a2657839.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论