Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 28
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    In the Table Rate table shipping module the variable $total_count tells you how many items are in the cart ...

    $total_count - $_SESSION['cart']->free_shipping_items() tells you how many are in the cart that are not marked as Free Shipping ...

    The Handling fee comes from the value of MODULE_SHIPPING_TABLE_HANDLING and you can see where that is used in the module and adjust its value ...
    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!]
    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!

  2. #12
    Join Date
    Jan 2008
    Posts
    71
    Plugin Contributions
    0

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    Okay. Thank you for the explanation. Not too difficult...

    One last question and I'll put this issue to bed, I promise.

    Is it possible to EXCLUDE a master category of products from being included with this handling (expedited) fee?

    The category ID to exclude is 4.

    So, if I'm purchasing three items and one of them is from master category 4, this shipping option would calculate the handling (expedited) fee by two items -- not three. Is this possible? Can you provide some direction here? Thank you!

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

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    There is a function in the shopping_cart class that you could use to check the number of items that match the master_categories_id and adjust the amount by that:
    Code:
      /**
       * Method to calculate the number of items in a cart based on an abitrary property
       *
       * $check_what is the fieldname example: 'products_is_free'
       * $check_value is the value being tested for - default is 1
       * Syntax: $_SESSION['cart']->in_cart_check('product_is_free','1');
       *
       * @param string product field to check
       * @param mixed value to check for
       * @return integer number of items matching restraint
       */
      function in_cart_check($check_what, $check_value='1') {
    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!]
    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!

  4. #14
    Join Date
    Jan 2008
    Posts
    71
    Plugin Contributions
    0

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    Okay. That's great. The only issue I'm having now is that I have products in SUB-categories in category 4. The master_categories_id stores the sub-category ID, if the product is in one. My issue is that I am trying to check for the CATEGORY ID of 4. Is that possible? Or am I going to have to run the function for each sub-category in category 4 and tally them up? Thanks!

    Question: And should this be performed inside the quote() function in my shipping module? Or does it matter where I put this?
    Last edited by msmith29063; 29 Nov 2008 at 04:04 PM.

  5. #15
    Join Date
    Jan 2008
    Posts
    71
    Plugin Contributions
    0

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    Crap. Okay -- I just found out that the expedited fee is for the ENTIRE order. Not per item. That's an easy fix to go back and remove the calculation.

    Here's my new (and last) question: How can I disable this new expedited shipping option when there is ONLY one or more item(s) in the cart from master category 4? If there is a mix of items from category 4 AND others -- then the option is available. Or if there is items from categories other than 4, the option is available.

    Thank you for your help!

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

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    You can use the same function using the master_categories_id for when to enable or disable the module by controlling the $this->enabled ...

    When false, this does not show the module ...

    When true, the module will show ...
    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!]
    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!

  7. #17
    Join Date
    Jan 2008
    Posts
    71
    Plugin Contributions
    0

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    I'm not exactly clear on how to implement. Could you elaborate more for me? Thank you for your help!

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

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    Find the section in the code that reads, note the } in there:
    Code:
      }
      /**
       * Enter description here...
       *
       * @param unknown_type $method
       * @return unknown
       */
    and change to read:
    Code:
        global $cart;
        if ( (defined('IS_ADMIN_FLAG') && IS_ADMIN_FLAG == false) &&  $_SESSION['cart']->in_cart_check('master_categories_id', 4) > 0 ) {
            $this->enabled = false;
        }
    
      }
      /**
       * Enter description here...
       *
       * @param unknown_type $method
       * @return unknown
       */
    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!]
    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!

  9. #19
    Join Date
    Jan 2008
    Posts
    71
    Plugin Contributions
    0

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    Thanks again for your help, Linda. Unfortunately, this didn't test correctly. It works as it should if the order contains items from master categories other than 4. BUT, if I JUST purchase an item from master category 4, this shipping option is still being offered. Any ideas? Thanks!
    Last edited by msmith29063; 24 Dec 2008 at 12:01 AM.

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

    Default Re: Table Rate/Free Shipping + Additional Optional Fee?

    Not sure what to tell you other than to confirm that the master_categories_id is 4 on the product that you are purchasing as I am not able to duplicate this problem ...

    For me, if nothing is from master_categories_id 4 I see Table Rate table shipping module, but if just 1 Product either by itself or with other products is from master_categories_id 4 then I do not see it ...
    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!]
    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!

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Table rate and free shipping not working correctly.
    By robbin21973 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 1 Jan 2013, 07:36 PM
  2. free shipping with table handling fee?
    By hootienchyna in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 13 Oct 2011, 02:38 PM
  3. combining free shipping with table rate
    By gentlemoms in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 8 Feb 2011, 07:27 PM
  4. Table Rate shipping PLUS a handling fee for certain items
    By marvin in forum Built-in Shipping and Payment Modules
    Replies: 13
    Last Post: 19 Apr 2009, 05:20 PM
  5. Free Shipping when order >$XX - Table Rate, Both Show
    By gcampos in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 22 Jun 2007, 06:28 AM

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