Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    184
    Plugin Contributions
    0

    Default Maximum Shipping Charge Query

    Hi!

    I have no idea how to manage this shipping issue or if there is a way.

    - If someone orders items from a certain category then the shipping charge is an additional $16 per order (not per item)
    - Flat rate option for all other categories is $8.00
    - New customers who order over $80 get free shipping (but have to pay if they order from the certain category).

    So shipping could be from $0 to a maximum of $24 depending on the order.

    eg: Purchases from both categories = $24
    Purchases from one or the other = $8 or $16 depending

    Is this possible at all?

    Ernie

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

    Default Re: Maximum Shipping Charge Query

    This would require customization of the Flat Rate flat shipping module to check:

    1 test if 1 or more products is from the $16.00 category

    2 test if 1 or more products is not from the $16.00 category charge $8.00

    3 if mixed cart charge both the $8.00 and the $16.00 charge both for $24.00

    4 test if the customer ever ordered and if not and the order is over $80.00 the shipping is Free ... unless 1 or more products is from the $16.00 category then charge $16.00 ...

    Once the math is figured out, the method of how much to charge could be customized to these specifications ...
    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
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Maximum Shipping Charge Query

    I believe if you customize the Flat Rate flat shipping module in:
    /includes/modules/shipping/flat.php

    you could customize it with the code in RED:
    Code:
        function quote($method = '') {
          global $order;
    
    // bof: custom calculate shipping
          global $db, $cart;
          // check how many from category 12 for $16.00 shipping
          $chk_cat16 = $_SESSION['cart']->in_cart_check('master_categories_id','12');
          // check how many from all categories for $8.00 shipping
          $chk_catall = $_SESSION['cart']->count_contents();
          $chk_customer_orders = $db->Execute("select orders_id from " . TABLE_ORDERS . " WHERE customers_id = '" . (int)$_SESSION['customer_id'] . "'");
          $current_shipping = 0.00;
          // charge 16.00 for category 12
          if ($chk_cat16 > 0) {
            $current_shipping += 16.00;
          }
          // charge $8.00 for all other categories
          if ($chk_catall > 0 && ($chk_catall != $chk_cat16)) {
            $current_shipping += 8.00;
          }
          // if this is first order and over $80.00
          if ($chk_customer_orders->RecordCount() == 0 && $_SESSION['cart']->show_total() > 80.00) {
            if ($chk_cat16 > 0) {
            // charge only $16.00 for shipping if from category 12
              $current_shipping = 16.00;
            } else {
            // Free Shipping if not category 12
              $current_shipping = 0.00;
            }
          }
    
          $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => MODULE_SHIPPING_FLAT_TEXT_WAY,
                                                         'cost' => MODULE_SHIPPING_FLAT_COST + $current_shipping)));
    
    // eof: custom calculate shipping
    and it should do what you are asking for ...

    This is example is using categories_12 12 as referenced by:
    master_categories_id

    check for Products using 12 as the master_categories_id ...
    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. Maximum shipping charge in per unit module
    By Togfather in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 27 Jan 2010, 11:10 PM
  2. Maximum Shipping Cost and Bank Transfer Charge
    By ffodnib in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 20 Apr 2009, 02:02 PM
  3. Shipping Charge Query
    By Sykth in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 23 Oct 2008, 02:45 PM
  4. Maximum Charge for Shipping Fee - No Matter How many ordered
    By alcheme in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 15 Dec 2006, 09:38 AM
  5. maximum Shipping Charge? Possible?>
    By atsdotha in forum Addon Shipping Modules
    Replies: 2
    Last Post: 29 Nov 2006, 07:39 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