Page 3 of 10 FirstFirst 12345 ... LastLast
Results 21 to 30 of 99
  1. #21
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    It works! Wow, I'd never have thought the sort order would do that. Thanks Ajeh, it's "almost" perfect!

    Now, is it possible to do the opposite code and place it in the table.php file, so that it's detecting when the cart only has items from category 409 and therefore not showing as an option?

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

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    Neat eh?
    Code:
    // bof: do not show if all Products are from master_categories_id 409
      if (!IS_ADMIN_FLAG) {
        // check the count of a specific field
        $chk_catAll = 0;
        $chk_cat409 = 0;
        $chk_catAll = $_SESSION['cart']->count_contents();
        // check how many Products are in the cart for master_categories_id 409
        $chk_cat409 = $_SESSION['cart']->in_cart_check('master_categories_id','409');
        // if any are found turn off the shipping module
        if ($chk_cat409 == $chk_catAll) {
          $this->enabled = false;
        }
      }
    // eof: do not show if all Products are from master_categories_id 409
    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. #23
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    That's pretty amazing! I mean what you can do with code!! You're amazing Ajeh!!!

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

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    Glad that things are now working for you ...
    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. #25
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    Another few jars of coffee en-route

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

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    Thank you kindly for the support, the Zen Cart Team really appreciates it greatly!
    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!

  7. #27
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    Another quick question though? How would I add categories to that code, so that it wasn't just category 409. Say for example I wanted to apply these very same rules to categories 409, 7, 105, 103, 104, 336, 372 and 361?

    And what if some of those category ID's weren't actually master categories?

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

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    Follow this pattern and add as many as you need:
    Code:
    // bof: only show if all Products are from master_categories_id 409, 7, 103, 104
      if (!IS_ADMIN_FLAG) {
        // check the count of a specific field
        $chk_catAll = 0;
        $chk_cats = 0;
        $chk_catAll = $_SESSION['cart']->count_contents();
        // check how many Products are in the cart for master_categories_id 409
        $chk_cats += $_SESSION['cart']->in_cart_check('master_categories_id','409');
        $chk_cats += $_SESSION['cart']->in_cart_check('master_categories_id','7');
        $chk_cats += $_SESSION['cart']->in_cart_check('master_categories_id','103');
        $chk_cats += $_SESSION['cart']->in_cart_check('master_categories_id','104');
        // if any are found turn off the shipping module
        if ($chk_cats != $chk_catAll) {
          $this->enabled = false;
        }
      }
    // eof: only show if all Products are from master_categories_id 409, 7, 103, 104
    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!

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

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    And what if some of those category ID's weren't actually master categories?
    Meaning what, exactly?
    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. #30
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Flat Rate Shipping - Table Rates - Duplicate for Category Specific Items?

    Quote Originally Posted by Ajeh View Post
    Meaning what, exactly?
    Meaning, the products are just linked to the category and the products isn't in there originally, so the category isn't the master category. I don't suppose it would matter?

 

 
Page 3 of 10 FirstFirst 12345 ... LastLast

Similar Threads

  1. free shipping for specific zip code, flat rate otherwise
    By newdre in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 11 Jan 2012, 11:39 AM
  2. Flat Rate Shipping for Small Items
    By AirsoftOutfitter in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 18 Mar 2010, 10:22 PM
  3. Calculate shipping on all items, except flat rate on specific category
    By buckit in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 1 Dec 2009, 06:24 PM
  4. Flat rate just for a set cities and UPS or USPS shipping rates for States
    By pkalout in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 9 Oct 2009, 04:20 PM
  5. Flat Rate shipping challenge - need a separate rate for a few heavier items
    By Nigel Lew in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 27 Jun 2008, 10:07 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