Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2013
    Location
    California
    Posts
    11
    Plugin Contributions
    0

    Default Turning off "Table Rate" before a certain price

    I saw the below on another thread, where the table rate is ignored depending on (greater than or less than) a certain price. I was wondering if the same thing can be done for a certain price and if so, can it be easily switched from (greater than or less than) as well?

    thank you!

    http://www.zen-cart.com/showthread.php?205841-Use-Table-rate-to-a-point-then-ignore&highlight=table+price+range

    "So are you saying you want it to turn off on a weight > .25?

    If so, you can customize the file:
    /includes/modules/shipping/table.php

    and in the function quote, add the code in RED:

    Code:
    // bof: disable shipping module > .25
    if ($shipping_weight > .25) {
    // skip shipping
    } else {
    // show shipping
    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
    'cost' => $shipping + (MODULE_SHIPPING_TABLE_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_TABLE_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_TABLE_HANDLING) ) ));
    }
    // eof: disable shipping module > .25"

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

    Default Re: Turning off "Table Rate" before a certain price

    This is a new table.php that has features for when to turn OFF the shipping module ...

    See if it can manage for you what you are wanting ...

    Everything is in the settings for the Rates, so follow:

    1 Download this file

    2 Edit your current settings and save them to NotePad

    3 Uninstall your Table Rate table shipping module

    4 Upload this new table.php module to:
    /includes/modules/shipping

    5 Install and customize

    Notice there is a new setting for OFF ...

    Try using that for what you need on disabling the Table Rate table shipping module ...
    Attached Files Attached Files
    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
    Apr 2013
    Location
    California
    Posts
    11
    Plugin Contributions
    0

    Default Re: Turning off "Table Rate" before a certain price

    Thank you SO MUCH for reponding so quickly to my thread, I REALLY appreciate it.

    I inserted the "table.zip" file into the store and I noticed the "OFF"

    "To terminate quotes use OFF to no longer show this shipping module. To turn off quotes at 10 or more, use 3:8.50,7:10.50,9:15%,10:OFF" - Wonderful, excellent, love it!!

    Using shipping modules UP TO a cetain price or weight
    However, I was hoping that USPS(the one my dropshipper uses) and/or FedEx(the other one my dropshipper uses), and/or UPS and/or etc can be used for calculating shipping and NOT have the "Table Rate" module show-up until a certain price or weight is in check-out and then ONLY use "Table Rate" mod from then on.

    Mild Clarification:
    The weight or price determination will be based on my "Table Method" selection that's within the "Table Rate" module.

    My example below:
    999.99:OFF,1999.00:100.00,3499.00:155.00,4999.00:210.00,6499.00:265.00,7999.00:270.00,8000 .00:300.00

    What I'm attempting in the line above is to turn off the "Table Rate" for anything priced from $0 to $999.99 (it'd be great if weight had this option as well) and have the other shipping mods calculate shipping within that range of $0 to $999.99. Then I'd like for the other shipping mods to disappear when the price (or weight, respectively) reaches $1,000.00+ and have the "Table Rate" mod take over calcuations from there, due to the heavier weight, larger boxes and high priced ticket items.

    THANK YOU SO MUCH AHEAD OF TIME FOR LOOKING AT THIS.

    I apologize if the above is messy, it's been a looooonnnnggg week and my brain is moooossh. I realized this when I had to retype some sections, several times. I'm still worried if it makes sense or not.

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

    Default Re: Turning off "Table Rate" before a certain price

    Unfortunately, OFF is a terminator and once set to OFF, all other settings are ignored ...

    If you want to turn off the Table Rate when less than or equal to $999.99, then you would use the code in RED:
    Code:
        if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
        }
    
    // bof: turn off until price > 999.99
        if (!IS_ADMIN_FLAG) {
    //echo 'Table  cart total: ' . $_SESSION['cart']->total . ' - ' . ($_SESSION['cart']->total < 999.99 ? 'YES HIDE' : 'NO SHOW') .  '<br>';
          if ($_SESSION['cart']->total < 999.99) {
            $this->enabled = false;
          }
        }
    // eof: turn off until price > 999.99
    
    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!

  5. #5
    Join Date
    Jan 2009
    Posts
    54
    Plugin Contributions
    0

    Default Re: Turning off "Table Rate" before a certain price

    Along the same lines as above, I use the table rate as a low cost option for items up to 100g. But I could also do with limiting it's availability over a certain price, say £10.00. Is it possible to restrict by weight and value?

    I've currently got the following code inserted to deal with the weight:
    // bof: turn off for weight over 100
    if (!IS_ADMIN_FLAG) {
    global $cart;
    if ($_SESSION['cart']->show_weight() > 100) {
    $this->enabled = false;
    }
    }
    // eof: turn off for weight over 100

    Thanks,

    Alan.

    PS I'm still using 1.3.8a

  6. #6
    Join Date
    Jan 2009
    Posts
    54
    Plugin Contributions
    0

    Default Re: Turning off "Table Rate" before a certain price

    Sorry, that should have read "limiting its availability to BELOW a certain price, say £10.00"

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

    Default Re: Turning off "Table Rate" before a certain price

    You could use for the amount:
    $_SESSION['cart']->show_total()
    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!

  8. #8
    Join Date
    Jan 2009
    Posts
    54
    Plugin Contributions
    0

    Default Re: Turning off "Table Rate" before a certain price

    Sorry, coding is really not my thing! How would that make the table rate only show for cart contents of less than £10?

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

    Default Re: Turning off "Table Rate" before a certain price

    You are either using for just weight:
    Code:
    if ($_SESSION['cart']->show_weight() > 100) {
    for just price:
    Code:
    if ($_SESSION['cart']->show_total()  > 10.00) {
    or for either/or:
    Code:
    if ($_SESSION['cart']->show_weight() > 100 || $_SESSION['cart']->show_total()  > 10.00) {
    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!

  10. #10
    Join Date
    Jan 2009
    Posts
    54
    Plugin Contributions
    0

    Default Re: Turning off "Table Rate" before a certain price

    Perfect - thank you so much.

    Alan.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Using "table" shipping but need one category to be "Flat Rate"
    By GTHENRY in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 27 Apr 2011, 08:35 PM
  2. Shopping cart - trying to turn off "Total Items" "Weight" and "Price"
    By deshojo in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 4 Apr 2011, 07:15 PM
  3. How do I change "Table Rate (Best Way)" to "Ground Shipping"?
    By John Vieth in forum General Questions
    Replies: 4
    Last Post: 1 Jul 2010, 10:37 PM
  4. Display "Qty Discounts Off Price" table Product Listing intead of Detail
    By digulu in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 30 Dec 2009, 01:34 AM
  5. Turning off "write a review" and "tell..."
    By lynnema in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Sep 2006, 02:49 PM

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