Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Disable table shipping after certain rate

Disable table shipping after certain rate

Locked

Views: 6,482

Results 21 to 40 of 42
This thread is locked. New replies are disabled.
8 Sep 2009, 5:30 AM
#21
ajeh avatar

ajeh

Oba-san

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

Disable table shipping after certain rate

$shipping_weight is not available everywhere in the module ...

$_SESSION['cart']->show_weight() is a good choice, but before the line using it, you would need to use a:
global $cart;

For example, in Table Rate shipping module for table.php you could use:

// Check for Weight and display module if weight exceeds stated value 
if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_weight() > 3) { 
  $this->enabled = false; 
}
9 Sep 2009, 3:02 PM
#22
fergusmacdonald avatar

fergusmacdonald

Zen Follower

Join Date:
Oct 2007
Location:
Edinburgh, Scotland
Posts:
243
Plugin Contributions:
0

Re: Disable table shipping after certain rate

Hi there,

Is it possible to hide the table rate when the cart reaches a certain value, rather than a particular weight?

IE, i want to allow a particular table rate option up to £30, but not over that as the insurance covers only up to £30.

Any help would be much appreciated,
Fergus

11 Sep 2009, 3:56 AM
#23
ajeh avatar

ajeh

Oba-san

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

Re: Disable table shipping after certain rate

You can disable the shipping modules based on any condition in the same manner ...

11 Sep 2009, 9:50 AM
#24
fergusmacdonald avatar

fergusmacdonald

Zen Follower

Join Date:
Oct 2007
Location:
Edinburgh, Scotland
Posts:
243
Plugin Contributions:
0

Re: Disable table shipping after certain rate

OK great. Would you mind writing the code to disable above a particular value and let me know where to insert it.

Many thanks.

13 Sep 2009, 3:34 PM
#25
ajeh avatar

ajeh

Oba-san

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

Re: Disable table shipping after certain rate

For the Table Rate table shipping module, you will see the code:

    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
    }

Change that to read:

    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_TABLE_STATUS == 'True') ? true : false);
    }

// Check for Weight and display module if weight exceeds stated value
if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_total() > 30) {
  $this->enabled = false;
}
13 Sep 2009, 4:22 PM
#26
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Disable table shipping after certain rate

Ajeh:

post above

Thanks Ajeh! That worked. Your remarkable.

14 Sep 2009, 3:58 AM
#27
ajeh avatar

ajeh

Oba-san

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

Re: Disable table shipping after certain rate

You are most welcome ... glad that this worked for you ... :smile:

14 Sep 2009, 8:04 AM
#28
fergusmacdonald avatar

fergusmacdonald

Zen Follower

Join Date:
Oct 2007
Location:
Edinburgh, Scotland
Posts:
243
Plugin Contributions:
0

Re: Disable table shipping after certain rate

Superb! Thank you very much indeed.

14 Sep 2009, 2:43 PM
#29
ajeh avatar

ajeh

Oba-san

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

Re: Disable table shipping after certain rate

Thanks for the update that this was able to help you out as well ... :cool:

25 Nov 2009, 9:53 PM
#30
gbks avatar

gbks

New Zenner

Join Date:
Nov 2009
Posts:
4
Plugin Contributions:
0

Re: Disable table shipping after certain rate

where do I go to input the html language?

25 Nov 2009, 10:13 PM
#31
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Disable table shipping after certain rate

gbks:

where do I go to input the html language?

/includes/modules/shipping/table.php
Or
/includes/modules/shipping/the-one-you-want.php

Use code seen in post #**25**

25 Nov 2009, 10:43 PM
#32
gbks avatar

gbks

New Zenner

Join Date:
Nov 2009
Posts:
4
Plugin Contributions:
0

Re: Disable table shipping after certain rate

where do i /includes/modules/shipping/table.php? I tried adding it to my zen-cart address but it came up with "not found"

25 Nov 2009, 10:47 PM
#33
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Disable table shipping after certain rate

this is a location of a file on your server; like the files uploaded before install, or like and address of a file.

use FTP or 'file manager in your hosting control panel' to access and edit this file.

30 Nov 2009, 5:35 PM
#34
zahid_hussain avatar

zahid_hussain

New Zenner

Join Date:
Sep 2009
Posts:
54
Plugin Contributions:
0

Re: Disable table shipping after certain rate

Zone table is only working for only one categegoirs , how i will enable for 3 to four diffrent categoire with diffrent shipping charges with diffrent tax class. please let me know

Thanks
Zahid:clap:

25 Oct 2010, 7:06 AM
#35
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Disable table shipping after certain rate

Zencart 1.3.9f
Modules installed
Aus Post (uninstalled)
Image Handler2

I need help please. I have -
Some products under the value of $45 or orders totals are under $45 and I want to charge a fixed freight fee of $10 (anything adds up to $45)
Some products over the value of $45 and want them to be FREE shipping with Free shipping logo showing.

In the Products sections, I have marked some products as follows:
Free Shipping with Free shipping logo displayed - I have all ready activated some of the items as 'Always Free Shipping: Yes, Always Free Shipping'

All products are sold within Australia only.

Which shipping do I need to use?
What will be my 'Shipping Table' figures be?

I really appreciate if someone please help.

25 Oct 2010, 12:54 PM
#36
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Disable table shipping after certain rate

oavs:

Zencart 1.3.9f
Modules installed
Aus Post (uninstalled)
Image Handler2

I need help please. I have -
Some products under the value of $45 or orders totals are under $45 and I want to charge a fixed freight fee of $10 (anything adds up to $45)
Some products over the value of $45 and want them to be FREE shipping with Free shipping logo showing.
modules>shipping> Free Shipping Options
Total >=
Free Shipping when Total >=$45

25 Oct 2010, 1:00 PM
#37
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Disable table shipping after certain rate

vandiermen:

modules>shipping> Free Shipping Options
Total >=
Free Shipping when Total >=$45

Wow , how cool is that. Until you pointed out, I would not have seen it. Thanks for letting me know...

How do I charge $10 for items under $45? when is set to >=$45 ?

Would it be Shipping Cost: 10.00 ?

25 Oct 2010, 1:08 PM
#38
vandiermen avatar

vandiermen

Totally Zenned

Join Date:
Feb 2007
Posts:
518
Plugin Contributions:
1

Re: Disable table shipping after certain rate

oavs:

How do I charge $10 for items under $45? when is set to >=$45 ?

Would it be Shipping Cost: 10.00 ?

no just keep your flat rate for that.

##################################################_

this has a side box to tell people how close they are to getting free shipping: http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=550

25 Oct 2010, 1:49 PM
#39
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: Disable table shipping after certain rate

I got a problem now.

I have
Flat Rate > Shipping Cost> $10
Free Shipping Options

If I purchase

1 x item value of $232.95 (which would normally have freight cost $0 - over $45)
1 x item value of $29.95 (which would normally have freight cost $10 - under $45)

So total freight should be Zero, but shipping estimator says

Flat Rate (Best Way) $10
Free Shipping Options (Free Shipping) $0
Total of $21 freight ! what's going on?

anyway as I was writing this I found out that I had to change as well in addition to above to make it work
Modules >Order Total> Shipping>
Allow Free Shipping: True
Free Shipping For Orders Over: $45

it seems alright now and working but do I now really need Modules > Shipping > Free Shipping Options installed to make this work ?

25 Oct 2010, 2:00 PM
#40
ajeh avatar

ajeh

Oba-san

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

Re: Disable table shipping after certain rate

The Free Shipping Options freeoptions is a shipping module for having a Free Shipping Option show at the same time as other shipping modules ...

You have this set up so that Flat Rate flat shows for $10.00 ... and then if the Order is at >= $45 the Free Shipping Options shows ...

However, these trigger to both show at >= $45.00 ...

The good point is it gives the customer a choice for $10.00 as a quicker method to ship or the slower Free Shipping Option ...

If this isn't the case of one method being faster than the other, then you want the Flat Rate flat shipping module to be disabled or hide when the Total is >= 45.00 ...

So, this means that you would need to customize the Flat Rate flat shipping module if you want to turn it off for orders of >= $45.00 ... and this is done by controlling the:
$this->enabled

in the shipping module based on the total of the Order ...

You can do this by customizing the Flat Rate flat shipping module with the code:

// Check for Weight and display module if weight exceeds stated value
if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_total() > 45) {
  $this->enabled = false;
}

NOTE: I like to clone the shipping module rather than just edit it, so that I don't overwrite it in the future on upgrades ...

Or, just be sure to keep a backup of your customized shipping module if you overwrite the original so that you have it for the future ...

NOTE: if you look a few posts back from this one, you can see how this is used in the code and where to put it ...