Forums / Built-in Shipping and Payment Modules / free shipping if order contains certain product

free shipping if order contains certain product

Locked

Views: 1,570

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
17 Nov 2009, 3:02 PM
#1
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

free shipping if order contains certain product

Currently two products have free shipping but all the other products have shipping costs. Is it possible to make an order that contains the free shipping item plus other items to be free shipping for the whole order?
Shipping cost is based on spend at a fixed sliding rate.
Thanks

17 Nov 2009, 3:25 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: free shipping if order contains certain product

What shipping modules do you have installed for managing the Free shipping and the Regular shipping right now? :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!

17 Nov 2009, 3:35 PM
#3
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: free shipping if order contains certain product

Thanks for the speedy reply.
Table rate and freeshipping (freeshipper)
Table rate is set to overall spend.
Hope this helps
Ian

17 Nov 2009, 4:41 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: free shipping if order contains certain product

Customize the freeoptions.php and change the code to read:

      // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
          $this->enabled = ((MODULE_SHIPPING_FREEOPTIONS_STATUS == 'True') ? true : false);
      }

// only show if products_id 11 or 12 are in the cart
      if (!IS_ADMIN_FLAG) {
        global $cart;
        $chk_prods = $_SESSION['cart']->in_cart_check('products_id','11')  + $_SESSION['cart']->in_cart_check('products_id','12');
        if ($chk_prods > 0) {
          $this->enabled = true;
        } else {
          $this->enabled = false;
        }
      }

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

Change the tables.php to read:

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
    }

// do NOT show if products_id 11 or 12 are in the cart
      if (!IS_ADMIN_FLAG) {
        global $cart;
        $chk_prods = $_SESSION['cart']->in_cart_check('products_id','11')  + $_SESSION['cart']->in_cart_check('products_id','12');
        if ($chk_prods > 0) {
          $this->enabled = false;
        }
      }

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

where 11 and 12 are the products_id controlling this ...

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!

17 Nov 2009, 4:53 PM
#5
ianhg avatar

ianhg

Zen Follower

Join Date:
Jul 2007
Posts:
345
Plugin Contributions:
3

Re: free shipping if order contains certain product

Thanks for the help much appreciated :clap:

17 Nov 2009, 6:22 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: free shipping if order contains certain product

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!