Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29
  1. #21
    Join Date
    Apr 2009
    Posts
    17
    Plugin Contributions
    0

    Default Re: Free Shipping Options module, how to exclude some categories?

    Definitely had error logs, a myriad of errors.
    I think this is too advanced for me unfortunately, I'm sorry the time you put into helping me was wasted, I really do appreciate the help.

    I literally just need to modify freeoptions.php so it will disable the free shipping option if I add a product from, say, category 108.

    I think I need to do a lot more reading before I can get a handle on how to do that.

  2. #22
    Join Date
    Apr 2009
    Posts
    17
    Plugin Contributions
    0

    Default Re: Free Shipping Options module, how to exclude some categories?

    For instance, to throw away everything that seems unneccessary, can I just put this in freeoptions?

    PHP Code:
    // skip certain categories
          
    if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','108') > 0) {
            
    $this->enabled false;
          } 
    I can't imagine a simpler way to do it (I think you wrote this code in another thread). Yet if I take an order that qualifies for free shipping, and add a product from category 108, I still am offered the free shipping option.

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

    Default Re: Free Shipping Options module, how to exclude some categories?

    If your Products are using the categories_id 108 as their master_categories_id then this should work to disable Free Shipping Options freeoptions shipping module ...

    Just add the code below:
    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
              $this->enabled = ((MODULE_SHIPPING_FREEOPTIONS_STATUS == 'True') ? true : false);
          }
    so you should have:
    Code:
          // disable only when entire cart is free shipping
          if (zen_get_shipping_enabled($this->code)) {
              $this->enabled = ((MODULE_SHIPPING_FREEOPTIONS_STATUS == 'True') ? true : false);
          }
    
    // skip certain categories
          if (IS_ADMIN_FLAG == false && $_SESSION['cart']->in_cart_check('master_categories_id','10') > 0) {
            $this->enabled = 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.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!

  4. #24
    Join Date
    Apr 2009
    Posts
    17
    Plugin Contributions
    0

    Default Re: Free Shipping Options module, how to exclude some categories?

    Wish I knew what to say. I have the code just like you've got it there, and I can still add a whole cart's worth of product 108 and get free shipping. It makes no sense.
    No errors in the cache.

    ...darn.

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

    Default Re: Free Shipping Options module, how to exclude some categories?

    Did you change the '10' to '108' or whatever master_categories_id that you are testing?
    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!

  6. #26
    Join Date
    Mar 2005
    Location
    California
    Posts
    663
    Plugin Contributions
    0

    Default Re: Free Shipping Options module, how to exclude some categories?

    geodave, did you create the extra function file with the code in post #12 and put it in your extra functions folders?


    If the simpler code Ajeh provided is not working is probably because your category id 108 is not the immediate category that contains the products, your products might be in a subcategory of category id 108.

  7. #27
    Join Date
    Apr 2009
    Posts
    17
    Plugin Contributions
    0

    Default Re: Free Shipping Options module, how to exclude some categories?

    Did you change the '10' to '108' or whatever master_categories_id that you are testing?
    I knew I should have specified that, but yes I did :)

    If the simpler code Ajeh provided is not working is probably because your category id 108 is not the immediate category that contains the products, your products might be in a subcategory of category id 108.
    It is set up like this: Catalog top -> Clothing -> Shirts. Shirts is category 108, it has no subcategories, and all 10 products in the "Shirts" category show "Product Master Category ID# 108 Shirts"

    Is it possible that in freeoptions, although I'm setting this->enabled=false, it is being switched back to true through some other means?
    Like maybe the fact that the cart is past the price threshold for free shipping, that's overruling the code that should bar category 108?

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

    Default Re: Free Shipping Options module, how to exclude some categories?

    You could zip your Free Shipping Options freeoptions shipping module and add it as an attachment so we can see what might be happening ...
    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
    Mar 2005
    Location
    California
    Posts
    663
    Plugin Contributions
    0

    Default Re: Free Shipping Options module, how to exclude some categories?

    When you tried the code to exclude all subcategories, did you create the extra function file with the code in post #12 and put it in your extra functions folders?

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. group pricing exclude some master categories
    By count in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 20 Jan 2013, 11:42 PM
  2. Limiting shipping options for some product categories
    By ShawnMilo in forum Addon Shipping Modules
    Replies: 13
    Last Post: 26 Jun 2008, 01:46 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. Free Shipping Options Module
    By WaltBoyd in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 2 Dec 2007, 09:09 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR