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
Share Improve this question edited Sep 13, 2018 at 20:33 Marc 7415 silver badges15 bronze badges asked Sep 13, 2018 at 17:02 SurajSuraj 15310 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 0

Try this plugin Advanced Flat Rate Shipping Method WooCommerce.

Hope this helps.

This example seems very close to what your looking for.

  1. Create your shipping zone
  2. Setup your shipping methods
  3. 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