Results 1 to 5 of 5
  1. #1
    Join Date
    May 2010
    Posts
    222
    Plugin Contributions
    0

    Default Making shipping options dependant on price or weight

    Is there a way to allow a shipping option to only appear if customers checkout for a certain price? I sell soaps. I would like to offer customers the option to select a flat rate if they only order one bar of soap. For example, if I wanted to offer Fed Ex ground to anyone purchasing something more than $100 or weighing more than ten pounds, how would I do that (just an example, I actually want to use a flat rate)?

    Is there a way to do this? Thank you for any help.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default Re: Making shipping options dependant on price or weight

    The display of the shipping modules is controlled by the:
    $this->enabled

    in each module ...

    You can test the shopping cart and based on the Total and Weight control the settings of the $this->enabled to turn them on and off ...

    What shipping modules are you actually using?

    You might also look at the threads at the bottom of this one for examples ...
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    May 2010
    Posts
    222
    Plugin Contributions
    0

    Default Re: Making shipping options dependant on price or weight

    Quote Originally Posted by Ajeh View Post
    The display of the shipping modules is controlled by the:
    $this->enabled

    in each module ...

    You can test the shopping cart and based on the Total and Weight control the settings of the $this->enabled to turn them on and off ...

    What shipping modules are you actually using?

    You might also look at the threads at the bottom of this one for examples ...
    I am using the USPS shipping module.

    Where do I find "$this->enabled"? I want to use flat.php for flat rate. I want the flat rate to be $5, but I want the shipping module to only appear if the order is below $X.YZ. The reason being, one bar of soap will ship in a small flat rate USPS box, but ten will obviously not fit in the $5 small flat rate box.

    Thank you for the help so far

  4. #4
    Join Date
    May 2010
    Posts
    222
    Plugin Contributions
    0

    Default Re: Making shipping options dependant on price or weight

    I guess I could just use the Per Item shipping module. I still would like to know how to hide it, though. I do not want someone with a large order seeing a really high shipping charge.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,726
    Plugin Contributions
    6

    Default Re: Making shipping options dependant on price or weight

    If you look at some of the related topics below this thread, you should see you can use something like:

    Example, to not show when weight is less than 20 ...
    Code:
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_weight() < 20) {
      $this->enabled = false;
    } else {
      $this->enabled = true;
    }
    This code would be placed, for example, in the Flat Rate flat shipping module for:
    /includes/modules/shipping/flat.php

    just below the code:
    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);
          }
    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.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

 

 

Similar Threads

  1. Shipping Module, dependant on weight
    By Mike_Dean in forum General Questions
    Replies: 18
    Last Post: 15 Mar 2010, 12:12 AM
  2. free shipping options - total AND weight
    By aussiesapphire in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 16 Oct 2008, 08:18 PM
  3. How to exclude certain shipping options if certain weight
    By dman76 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 18 May 2008, 12:15 PM
  4. MZMT shipping module - Display Shipping Options based on Weight
    By DogTags in forum Addon Shipping Modules
    Replies: 2
    Last Post: 27 Feb 2007, 04:26 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
  •