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 1 to 20 of 42
This thread is locked. New replies are disabled.
23 May 2009, 6:11 AM
#1
lilblocker avatar

lilblocker

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

Disable table shipping after certain rate

G'Day
I'm using Zen v1.3.8a, using a customised template.. I have a few table rates set up with different options so overnight, 2-3 days and 5-7 days. But my only problem here is that the overnight option I only want to offer to orders 3.0kg or less so as soon as it hits 3.1kg is it possible for that option to magically dissapear ??? 0.501:8.184,3.0:11.91 is my current table set up i've googled for ages and had a look through the online FAQ's and manual and come up stumps... The other dirty alternative is whacking in some ridiculous price which i don't really want to do as I want to offer the best prices to my customers.

Cheers

Nick

23 May 2009, 9:17 AM
#2
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Disable table shipping after certain rate

0.501:8.184,3.0:11.91 seems correct. If an order exceeds 3.0 in weight then your overnight shipping module should not be there as an option.

What's happening when a cart reaches 3kg++ and yuo click checkout? Is it still displaying the overnight option even though you have 3.0:11.91 set as the last option in your tariff fields?

23 May 2009, 11:32 PM
#3
lilblocker avatar

lilblocker

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

Re: Disable table shipping after certain rate

Hey,
Yeah unfortunately it still shows up but as $0.00 i'm basically looking for a calculation that says >3.10 = not available if that makes sense but at the moment is it is >3.10 = $0.00 which is crap............

Cheers

24 May 2009, 8:24 AM
#4
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Disable table shipping after certain rate

easy job to change table rates modules. You need to add a line of codes in "includes/modules/shipping/table.php"

if($shipping_weight > 3.0) $this->status = false;

You can transfer the code into the zencart one...I think that helps.

24 May 2009, 8:33 AM
#5
lilblocker avatar

lilblocker

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

Re: Disable table shipping after certain rate

Thanks for the response... Would I just insert it like this ?

define('MODULE_SHIPPING_TABLE2_TEXT_TITLE', 'Next Day (No Insurance - View our policy on uninsured items)');
if($shipping_weight > 3.0) $this->status = false;
define('MODULE_SHIPPING_TABLE2_TEXT_DESCRIPTION', 'ExpressPost');
define('MODULE_SHIPPING_TABLE2_TEXT_WAY', 'Express Post - Next Business Day Delivery after dispatch');
define('MODULE_SHIPPING_TABLE2_TEXT_WEIGHT', 'Weight');
define('MODULE_SHIPPING_TABLE2_TEXT_AMOUNT', 'Amount');

Cheers

Nick

24 May 2009, 8:52 AM
#6
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Disable table shipping after certain rate

oh, dear, I don't know you are not familiar with zencart working routines. The code can't be inserted like that.

Please find the codes below:

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

after it, insert line below:

if($shipping_weight > 3.0) $this->enabled = false;

24 May 2009, 9:04 AM
#7
lilblocker avatar

lilblocker

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

Re: Disable table shipping after certain rate

G'day,

I found the first line that was already in there.... i've added like this

$this->icon = '';
$this->tax_class = MODULE_SHIPPING_TABLE2_TAX_CLASS;
$this->tax_basis = MODULE_SHIPPING_TABLE2_TAX_BASIS;
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_TABLE2_STATUS == 'True') ? true : false);
}
if($shipping_weight > 3.0) $this->enabled = false;
if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_TABLE2_ZONE > 0) ) {
$check_flag = false;
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_TABLE2_ZONE . "' and

Uploaded but with 4kg in the basket it's still showing up as an option just with $0.00 as the cost... Have I inserted the code directly........ Thanks for your help so far....

24 May 2009, 9:10 AM
#8
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Disable table shipping after certain rate

I don't know why it's like that...are you using a standard Table Rate shipping file?

If it's not customized, it should work now.

Can you send me the file so I can have a look at it, my email is [email protected]

24 May 2009, 9:13 AM
#9
lilblocker avatar

lilblocker

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

Re: Disable table shipping after certain rate

Sure thing i'll email now.

24 May 2009, 9:18 AM
#10
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Disable table shipping after certain rate

I actually have a similar problem, which I why I was looking at the OP. My problem is that when an international cart weighs over 2kg, my shipping module cannot find any option as my carrier does not ship over this weight as standard and I have not inserted 2kg+++ into the tariffs. So, since it cannot find an option for 2kg, it goes into a redirect loop and gives a browser error page.

Apart from setting a cray price in the tariff pages, is there a way to sort out the redirect loop? Direct to a page that requests the customer contact us for a shipping quote?

24 May 2009, 9:19 AM
#11
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Disable table shipping after certain rate

just replied the mail...changed the global line

test it and let me know

24 May 2009, 9:23 AM
#12
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Disable table shipping after certain rate

limelites:

I actually have a similar problem, which I why I was looking at the OP. My problem is that when an international cart weighs over 2kg, my shipping module cannot find any option as my carrier does not ship over this weight as standard and I have not inserted 2kg+++ into the tariffs. So, since it cannot find an option for 2kg, it goes into a redirect loop and gives a browser error page.

Apart from setting a cray price in the tariff pages, is there a way to sort out the redirect loop? Direct to a page that requests the customer contact us for a shipping quote?

why don't you set it as "Not available for weight over 2KG". If this displays as an error message, it would help customers to know it's not supported.

BTW, didn't you use other shipping method?:oops:

24 May 2009, 9:24 AM
#13
lilblocker avatar

lilblocker

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

Re: Disable table shipping after certain rate

Hey Limelites....

ebusinessman might be able to help... I'm a newbie... :smile:

24 May 2009, 9:45 AM
#14
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Disable table shipping after certain rate

ebusinessman:

why don't you set it as "Not available for weight over 2KG". If this displays as an error message, it would help customers to know it's not supported.

BTW, didn't you use other shipping method?:oops:

Hi, yes, I would use another shipping method but can't put tariffs in the tables for over 2kg as the tariffs change daily. I like to shop around for courier quotes when an international package gets into the unknown zone of 2kg++

Looking at disabling the module for 2kg+ it does not give this option. It only gives options for monetary values.

24 May 2009, 9:58 AM
#15
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Disable table shipping after certain rate

disable 2kg+should be possible. the problem is how do you deal with the products over 2KG, I think a new shipping module that only handle this problem should be better. then you should have your own policy to this.

about dynamic tarrif, you can set it in admin daily if the shipping module support this (rebuild it and set in an extra field namely "daily tarrif")

so many interesting things in shipping as business varies...:P

24 May 2009, 10:09 AM
#16
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Disable table shipping after certain rate

Thanks ebusinessman, I will have to look into that. Daily tariff sounds good, although having to manually update tariffs every day will not be practical.

I will probably just add each tariff 2.1:xx,2.2:xx,29.9:xxxx, etc., into my existing module and add a factor of safety to each one :-)

Thanks...

24 May 2009, 10:24 AM
#17
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Disable table shipping after certain rate

hmm...you can set up cronjob to update it daily, which read the tarrif data from 3rd party site, or you can input it outside admin panel...not a big deal in fact. leave me PM if you need more help and it will send to my email box...I am not alway on forum

g'day

1 Jun 2009, 3:17 AM
#18
vandiermen avatar

vandiermen

Totally Zenned

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

Re: Disable table shipping after certain rate

I have a aust post module that is good for anything under 18KG's but a courier needs to take anything over 18KG's

I needed my zone rates to only come in to affect after 18KG's, heres the code I used to achieve this:

In includes/modules/shipping/zonetable.php
Or in
includes/modules/shipping/any_shipping_mod.php

Find this code

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

DIRECTLY BENEATH IT, add the following:

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

So it now looks something like:

 
      // disable only when entire cart is free shipping
      if (zen_get_shipping_enabled($this->code)) {
        $this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);
      }
 
// Check for Weight and display module if weight exceeds stated value 
if (IS_ADMIN_FLAG == false && $_SESSION['cart']->show_weight() < 18) { 
  $this->enabled = false; 
} else { 
  $this->enabled = true; 
}  
 
      // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
      $this->num_zones = 3;
    }
 
 
7 Sep 2009, 4:29 AM
#19
janks avatar

janks

New Zenner

Join Date:
May 2006
Posts:
30
Plugin Contributions:
1

Re: Disable table shipping after certain rate

I am trying to do the exact same thing as lilblocker without much success.

I have tried adding

        if ($shipping_weight > 3) {
        $check_flag = false;
    }

into the table module after the freeshipping argument line, but this didn't work, also with many other thingsi have tried.

I noted a solution may have been obtained by email, could you please paste the code into the thread so i may try it?

Thank you

Jai

7 Sep 2009, 9:45 AM
#20
janks avatar

janks

New Zenner

Join Date:
May 2006
Posts:
30
Plugin Contributions:
1

Re: Disable table shipping after certain rate

        if ($shipping_weight > 3) {
        $this->enabled = false;
    }

the php should have read