Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: exclude a product or category from Free Shipping freeoptions

    Do the Products in those 2 Categories use those two categories_id as their master_categories_id ...

    What are you using for the Free Shipping on orders over $100 ...
    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!

  2. #12
    Join Date
    Sep 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: exclude a product or category from Free Shipping freeoptions

    Hi thank you for the reply. I am using "order total shipping" module. Yes, I do believe the two names are the master categories. Thanks for your help.

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

    Default Re: exclude a product or category from Free Shipping freeoptions

    The easier method for Free Shipping is to use the Shipping module for Free Shipping Options freeoptions and set the Total >= 50.00 ...

    The customize the code in the:
    /includes/modules/shipping/freeoptions.php

    and change the code to read:
    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);
          }
          if (!IS_ADMIN_FLAG) {
            global $cart;
            $chk_cat = 0;
            $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id', '10');
            $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id', '53');
            if ($chk_cat > 0) {
              $this->enabled = false;
            }
          }
    What this will do is not show the Free Shipping Options when there are Products from the master_categories_id 10 or 53 in the cart and when those Products are not in the cart, then the customer will see the Free Shipping Options and the other shipping options to choose from ...
    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. #14
    Join Date
    Sep 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: exclude a product or category from Free Shipping freeoptions

    Thank you. I just have one more question. I found the code and am wondering how much to delete from the php. I noticed where it started, but don't know where to stop the code. This is what I see.

    if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREEOPTIONS_ZONE > 0) ) {
    $check_flag = false;
    $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FREEOPTIONS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
    while (!$check->EOF) {
    if ($check->fields['zone_id'] < 1) {
    $check_flag = true;
    break;
    } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
    $check_flag = true;
    break;
    }
    $check->MoveNext();
    }

    if ($check_flag == false) {
    $this->enabled = false;
    }
    }
    }

    Thank you.

  5. #15
    Join Date
    Sep 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: exclude a product or category from Free Shipping freeoptions

    From what I understand, I replace the entire set of what is there except the very last pointed bracket?

  6. #16
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: exclude a product or category from Free Shipping freeoptions

    I believe you would add the code in red just before this line

    if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREEOPTIONS_ZONE > 0) ) {

    without deleting anything. The red code sets the $this->enabled to false in certain circumstances, so the if test will function as a switch.

  7. #17
    Join Date
    Sep 2011
    Posts
    19
    Plugin Contributions
    0

    Default Re: exclude a product or category from Free Shipping freeoptions

    Thank you so much, it works great!

  8. #18
    Join Date
    Oct 2005
    Posts
    116
    Plugin Contributions
    0

    Default Re: exclude a product or category from Free Shipping freeoptions

    Quote Originally Posted by Ajeh View Post
    The easier method for Free Shipping is to use the Shipping module for Free Shipping Options freeoptions and set the Total >= 50.00 ...

    The customize the code in the:
    /includes/modules/shipping/freeoptions.php

    and change the code to read:
    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);
          }
          if (!IS_ADMIN_FLAG) {
            global $cart;
            $chk_cat = 0;
            $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id', '10');
            $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id', '53');
            if ($chk_cat > 0) {
              $this->enabled = false;
            }
          }
    What this will do is not show the Free Shipping Options when there are Products from the master_categories_id 10 or 53 in the cart and when those Products are not in the cart, then the customer will see the Free Shipping Options and the other shipping options to choose from ...
    Hi
    Will this allow people to add products from master_categories_id 10 or 53 and have them included with the free shipping that they may have already qualified for? And/or add shipping costs only for the items that they didn't qualify for?

    I am trying to enable the same scenario with 1 category for free shipping with a master_categories_id of 4. If the customer qualifies for free shipping by adding enough items from category 4 then I would like them to be able to add other items from other categories and either give free shipping on the complete order or add only the shipping costs for the added items that are not in category 4.

    I would assume that I would just add a line for each category that I would like to exclude from the above php modification example. The question remains as to what happens if a customer adds items from one or more of the excluded categories as far as shipping costs?

    Hope I have explained my thoughts clearly.
    Thanks for any help that can be offered
    John

  9. #19
    Join Date
    Oct 2005
    Posts
    116
    Plugin Contributions
    0

    Default Re: exclude a product or category from Free Shipping freeoptions

    Follow-up
    This above coding works great for allowing free shipping on the category ID's that are not listed. If you add something from another category your free shipping (on the items that you have already qualified for free shipping) gets "tossed out the door". It DOES NOT leave free shipping on the already qualified items and just add shipping for the items in the excluded categories. It make them all paid shipping.

    Is there a way of just adding the cost of the excluded items and leave the free items as not getting added in?

    Example:
    $30.00 minimum for free shipping
    add 6 items from the free category. subtotal $35.00 no shipping

    2 items from the excluded categories subtotal $60.00 Shipping is $25.00

    The above 6 items plus the 2 excluded items subtotal $95 Shipping is $25.00 (My preferred method that doesn't happen)

    What it is doing is:
    The above 6 items plus the 2 excluded items subtotal $95 Shipping is $40.00

    Any thoughts?
    John

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v139h exclude products from free shipping
    By mikestaps in forum General Questions
    Replies: 23
    Last Post: 15 Aug 2013, 11:14 PM
  2. v139h Exclude category or product from group discount
    By abcisme in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 10 Aug 2012, 02:51 PM
  3. v139h exclude non continental united states zones from free shipping.
    By gloerick in forum Built-in Shipping and Payment Modules
    Replies: 103
    Last Post: 6 Mar 2012, 02:25 AM
  4. Exclude one category from shipping allow by 0 in stock
    By mdo82 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 26 Feb 2011, 09:56 AM
  5. exclude certain products from free shipping
    By emtecmedia in forum Built-in Shipping and Payment Modules
    Replies: 24
    Last Post: 28 Sep 2010, 05:15 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