Forums / General Questions / exclude products from free shipping

exclude products from free shipping

Views: 2,248

Results 21 to 24 of 24
14 Aug 2013, 8:36 PM
#21
mikestaps avatar

mikestaps

Zen Follower

Join Date:
Aug 2010
Location:
Grand Blanc, MI
Posts:
305
Plugin Contributions:
1

exclude products from free shipping

Well we celebrated a little too soon!!
Everything works great on the customer side of things, but I can no longer view/or change my shipping modules in the admin... I get the following myDEBUG Error:

[14-Aug-2013 14:04:00] PHP Fatal error:  Call to a member function count_contents() on a non-object in .../includes/modules/shipping/freeoptions.php on line 31

If I comment out the check then modules show/load properly:

 //check if entire cart is oils
	/*	$how_many_items = $_SESSION['cart']->count_contents();
		$how_many_oils = $_SESSION['cart']->in_cart_check('master_categories_id', '93');
	
		if ($how_many_items == $how_many_oils) {
			$this->enabled = false;
			} */

:blink: I really have to get my upgrade/rebuild done!!!

14 Aug 2013, 8:39 PM
#22
ajeh avatar

ajeh

Oba-san

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

Re: exclude products from free shipping

You need another IF around that for:

if (!IS_ADMIN_FLAG) {
// your stuff
}

as your stuff does not exist in the Admin ...

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!

15 Aug 2013, 6:59 PM
#23
mikestaps avatar

mikestaps

Zen Follower

Join Date:
Aug 2010
Location:
Grand Blanc, MI
Posts:
305
Plugin Contributions:
1

Re: exclude products from free shipping

That's too funny... I can't tell you how many times I've copied the (!IS_ADMIN_FLAG) in my customization's never really knowing what it did.
Now I know, "and knowing is half the battle"

Thanks again!

15 Aug 2013, 10:14 PM
#24
ajeh avatar

ajeh

Oba-san

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

Re: exclude products from free shipping

Hope that corrects the issues that you are having ...

Main idea is, most customizations do NOT need to be done/processed in the Admin so surround it with the IF and it will be ignored in the Admin ... :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!