Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Built-in Shipping and Payment Modules / Free shipping item triggers all else in cart to be free shipping

Free shipping item triggers all else in cart to be free shipping

24 May 2016, 8:13 PM
#1
avansant avatar

avansant

Zen Follower

Join Date:
Aug 2004
Posts:
122
Plugin Contributions:
0

Post #1 by avansant

I have a cart with flat rate shipping, but some things we have marked "free shipping" in the product description, which works fine. BUT if customer order things that are NOT free shipping, then they have to pay shipping. We want any free shipping item in the cart to trigger ALL in the cart to now be free shipping.

Is there a way to accomplish this? Or a mod? I've been searching the forum forever and keep finding things that sound close but then aren't this so I apologize if I missed it!

25 May 2016, 2:01 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

Do you just have the Flat Rate flat and FREE SHIPPING! freeshipper installed?

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!

25 May 2016, 2:50 PM
#3
avansant avatar

avansant

Zen Follower

Join Date:
Aug 2004
Posts:
122
Plugin Contributions:
0

Post #3 by avansant

They're the only ones I have on, yes.

25 May 2016, 2:54 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #4 by ajeh

To do this, customize the shipping module:
/includes/modules/shipping/flat.php

with the code in RED:

      // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
      }
[B]// bof: give Free Shipping if 1 or more Always Free Shipping is in cart
if (!IS_ADMIN_FLAG) {
  $chk_cart = $_SESSION['cart']->in_cart_check('product_is_always_free_shipping','1');
  if ($chk_cart > 0) {
    $this->enabled = false;
  }
}
// eof: give Free Shipping if 1 or more Always Free Shipping is in cart

[/B]      if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FLAT_ZONE > 0) ) {

and the module:
/includes/modules/shipping/freeshipper.php

      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_FREESHIPPER_STATUS == 'True') ? true : false);
      }
[B]// bof: give Free Shipping if 1 or more Always Free Shipping is in cart
if (!IS_ADMIN_FLAG) {
  $chk_cart = $_SESSION['cart']->in_cart_check('product_is_always_free_shipping','1');
  if ($chk_cart > 0) {
    $this->enabled = true;
  }
}
// eof: give Free Shipping if 1 or more Always Free Shipping is in cart
[/B]
      if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_FREESHIPPER_ZONE > 0) ) {

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!

25 May 2016, 3:09 PM
#5
avansant avatar

avansant

Zen Follower

Join Date:
Aug 2004
Posts:
122
Plugin Contributions:
0

Post #5 by avansant

Awesome - thank you!!

25 May 2016, 3:20 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #6 by ajeh

You are most welcome ... thanks for the update that this worked for you :smile:

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!