Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009
    Posts
    37
    Plugin Contributions
    0

    red flag Remove FLAT Rate Shipping when cart value is over

    Hello.

    I managed to get another problem for my ZenCart shop :)

    I would like the FLAT shipping to disappear from shipping options IF the cart value is over 40$. Currently I have a flat shipping option (costs 3.5) and store pickup (free) available. I also would like to have a FREE SHIPPING for orders over $40. I managed to set it almost perfectly via FreeOptions, but the FLAT is still showing up as an option and is even selected by default, even if the overall value is over $40.

    The way I have it set right now in the "Admin > Modules > Shipping"


    flatrate - ON
    Enable Flat Shipping
    True

    Shipping Cost
    3.50

    Tax Class
    --nič--

    Tax Basis
    Shipping

    Shipping Zone
    --nič--

    Sort Order
    15



    freeoptions - ON
    Enable Free Options Shipping
    True

    Shipping Cost
    0.00

    Handling Fee
    0

    Total >=
    40.00


    Total <=


    Weight >=


    Weight <=


    Item Count >=


    Item Count <=


    Tax Class
    --nič--

    Tax Basis
    Shipping

    Shipping Zone
    --nič--

    Sort Order
    1


    store pickup - ON
    Enable Store Pickup Shipping
    True

    Pickup Locations
    Celje;Ljubljana

    Shipping Cost
    0.00

    Tax Class
    --nič--

    Tax Basis
    Billing

    Shipping Zone
    --nič--

    Sort Order
    12
    So, how can I get that when the cart value is over $40, I will only have the option of FREE SHIPPING and STORE PICKUP, without "Flat Rate" being shown below ?

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Remove FLAT Rate Shipping when cart value is over

    You could edit the code for:
    /includes/modules/shipping/flat.php

    and add the code in RED:
    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
            $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
          }
    // bof: turn off flat for >= $40.00      
    if (!IS_ADMIN_FLAG) {
      $chk_total = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices();
      if ($chk_total >= 40.00) {
        $this->enabled = false;
      }
    }
    // eof: turn off flat for >= $40.00      
          if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Mar 2016
    Posts
    14
    Plugin Contributions
    0

    Default Re: Remove FLAT Rate Shipping when cart value is over

    the zone rates shipping module is a better way to do this, so i suggest that use zone rates instead and follow the settings below:

    1) Calculation Method -> Price
    2) Sort Order -> 1
    3) Zone 1 Countries -> 00 (default is US,CA)
    4) Zone 1 Shipping Table -> 40:3.5 (means that free shipping if sub-total over 40, or shipping cost is 3.5)

    then click the update button; that's all

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Remove FLAT Rate Shipping when cart value is over

    That would not work correctly with Zone Rates ... you would get the message:
    The shipping rate cannot be determined at this time
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. v154 Free US shipping, Flat Rate International over $50, $5.00 Shipping under $50
    By Rick5150 in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 27 Feb 2015, 04:24 PM
  2. Disable Flat Rate Shipping When Total Items in Cart >= 5
    By schoolboy in forum General Questions
    Replies: 7
    Last Post: 9 Jun 2011, 03:14 AM
  3. Flat Rate, Free Shipping Over £30 and Collection
    By mglong in forum Built-in Shipping and Payment Modules
    Replies: 15
    Last Post: 12 Mar 2011, 05:40 PM
  4. Shipping only costs under certain value flat rate
    By Muzz in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 26 Oct 2009, 04:48 AM
  5. Flat rate or similar module to only display when over a certain weight?
    By sam_m in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 3 Dec 2008, 12:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR