Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Sep 2015
    Location
    Lovettsville,VA
    Posts
    58
    Plugin Contributions
    0

    help question Item has free shipping if ordered with a another item ??

    Hi,

    Let me say first the folks on these forums are first rate. Every issue I have had as a newbie has been addressed quickly. On the downside, there are so many topics and posts it is difficult to find succinct information regarding issues. So, hence the post.

    What I am attempting to accomplish:
    If a given product "B" is ordered with product "A" then there is no charge for product "B" shipping. Otherwise if product "B" is ordered without product "A", (or ordered with any other product other than product "A") then there is a shipping charge for product "B". In other words, if product "B" is ordered with product "A", then only charge for product "A" shipping.

    Make sense?
    Regards,
    Ron

  2. #2
    Join Date
    Sep 2015
    Location
    Lovettsville,VA
    Posts
    58
    Plugin Contributions
    0

    Default Re: Item has free shipping if ordered with a another item ??

    Hi,

    Any takers?

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

    Default Re: Item has free shipping if ordered with a another item ??

    What shipping module(s) are you using?
    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. #4
    Join Date
    Sep 2008
    Location
    WA
    Posts
    555
    Plugin Contributions
    0

    Default Re: Item has free shipping if ordered with a another item ??

    I didn't get time to look but check through "that software guys", swguy, plugins. He has a bunch of free and then some for sale that handle stuff like this.

  5. #5
    Join Date
    Sep 2015
    Location
    Lovettsville,VA
    Posts
    58
    Plugin Contributions
    0

    Default Re: Item has free shipping if ordered with a another item ??

    Quote Originally Posted by Ajeh View Post
    What shipping module(s) are you using?
    The USPS shipping module.
    Thanks,
    Regards,
    Ron

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

    Default Re: Item has free shipping if ordered with a another item ??

    Is this the only Product that gets Free Shipping if Product A is ordered?
    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. #7
    Join Date
    Sep 2015
    Location
    Lovettsville,VA
    Posts
    58
    Plugin Contributions
    0

    Default Re: Item has free shipping if ordered with a another item ??

    Quote Originally Posted by Ajeh View Post
    Is this the only Product that gets Free Shipping if Product A is ordered?
    Hi,

    No, there will be three items available for free shipping if product "A" is ordered. Just a little bit of background. The product "A" is a Amateur radio device and it has three different connector options (and I suppose this would be product "B", "C", or "D".
    However , I just had a thought. If it makes it easier I could list only one connector item, product "B" and have the customer fill out the notes section during ordering of which connector option they want since I can make the price for any of the three different connector options will the same.

    Make sense?
    Regards,
    Ron

  8. #8
    Join Date
    Sep 2015
    Location
    Lovettsville,VA
    Posts
    58
    Plugin Contributions
    0

    Default Re: Item has free shipping if ordered with a another item ??

    Hi Again,

    Obviously I have not thought this through completely. I could simply list the same device four times. Each one with different connector options (no connectors (product "A" for the purposes of this discussion), connector option "B", connector option "C", or connector option "D").

    Regards,
    Ron

    (Some times I get stuck on the path and can't get off if it)
    Last edited by w4mmp; 19 Sep 2015 at 06:04 PM.

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

    Default Re: Item has free shipping if ordered with a another item ??

    You could customize the code for:
    /includes/classes/shipping.php

    by adding the code in RED:
    Code:
      function calculate_boxes_weight_and_tare() {
        global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes;
    
        $this->abort_legacy_calculations = FALSE;
        $this->notify('NOTIFY_SHIPPING_MODULE_PRE_CALCULATE_BOXES_AND_TARE');
        if ($this->abort_legacy_calculations) return;
    
    // bof: reduce weight if products_id 10 is in cart for products_id 12, 13 and 15
    $reduce_weight = 0;
    if ($_SESSION['cart']->in_cart(10)) {
      $reduce_weight += $_SESSION['cart']->in_cart_product_total_weight(12);
      $reduce_weight += $_SESSION['cart']->in_cart_product_total_weight(13);
      $reduce_weight += $_SESSION['cart']->in_cart_product_total_weight(15);
      $total_weight = $total_weight - $reduce_weight;
    }
    // eof: reduce weight if products_id 10 is in cart for products_id 12, 13 and 15
    
        if (is_array($this->modules)) {
    and customize the file:
    /includes/classes/shopping_cart.php

    by adding the code in RED:
    Code:
         return $new_qty;
      }
    
    // bof: reduce weight if products_id 10 is in cart for products_id 12, 13 and 15
    /**
     * calculate products_id weight in cart regardless of attributes
     * USAGE:  $product_total_weight = $this->in_cart_product_total_weight(12);
     * USAGE:  $chk_product_cart_total_weight = $_SESSION['cart']->in_cart_product_total_weight(12);
     *
     * @param mixed $product_id
     * @return float
     */
      function in_cart_product_total_weight($product_id) {
        $products = $this->get_products();
        $in_cart_product_weight = 0;
        for ($i=0, $n=sizeof($products); $i<$n; $i++) {
          if ((int)$product_id == (int)$products[$i]['id']) {
            $in_cart_product_weight += $products[$i]['weight'] * $products[$i]['quantity'];
          }
        } // end FOR loop
        return $in_cart_product_weight;
      }
    // eof: reduce weight if products_id 10 is in cart for products_id 12, 13 and 15
    
    }
    NOTE: the code added to the shopping_cart.php class will not need to be added in a future release of Zen Cart ...
    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. #10
    Join Date
    Sep 2015
    Location
    Lovettsville,VA
    Posts
    58
    Plugin Contributions
    0

    Default Re: Item has free shipping if ordered with a another item ??

    Thank you!

    I will give this a try later on this evening and let you know how it goes.

    Regards,
    Ron

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Free shipping for second item ordered
    By jen2swt in forum General Questions
    Replies: 7
    Last Post: 31 Jan 2014, 12:07 AM
  2. Free shipping on one item in USA and with purchase of another item
    By jendera in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 30 Dec 2009, 01:00 AM
  3. Free Item Contingent upon the Purchase of another item-How to setup?
    By everest in forum Setting Up Specials and SaleMaker
    Replies: 0
    Last Post: 15 May 2008, 01:19 AM
  4. free shipping item combined with non free item
    By gsdcypher in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 23 Jan 2008, 02:48 AM
  5. This item has free shipping
    By batteriesareus.com in forum General Questions
    Replies: 5
    Last Post: 24 Aug 2006, 02:41 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