Forums / Addon Shipping Modules / Maximum weight by zones?

Maximum weight by zones?

Locked

Views: 1,918

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
23 Mar 2009, 2:58 AM
#1
cjsmiff avatar

cjsmiff

Zen Follower

Join Date:
Jul 2006
Location:
UK
Posts:
170
Plugin Contributions:
0

Maximum weight by zones?

Hi,

I am wondering if anyone would know how to set the Maximum shipping weight by zones?

What I mean is I have 3 shipping zones:
1, UK
2, EU
3, ROW

I want to have the UK zone's maximum weight as unlimited and the other 2 zones maximum weight 2kg (or call for price over 2kg).

I am using 1.3.8a with table_rate_clone_1-0a to create my different shipping rates (one for each zone).

Any ideas anyone please?
Cheers
Claire
:blink:

20 May 2009, 2:57 PM
#2
mattys avatar

mattys

Zen Follower

Join Date:
Sep 2006
Location:
North Devon, England, UK
Posts:
289
Plugin Contributions:
0

Re: Maximum weight by zones?

I'm keen to know this too, have same spec as above

21 May 2009, 4:18 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Maximum weight by zones?

You would need to do some customization for this ...

For example, if you used Table Rate table for the Unlimited weight and set the Zone on that to manage who can use it and the Maximum Weight shipped to a high value, such as 5000 ... that takes care of that one ...

Then, if you clone Table Rate for the other two zones and added conditions to control the $this->enabled where if the weight is greater than 2 the modules would be disabled ...

this would then result in 1 of the 3 modules showing when checkout is allowed ... and none showing when checkout is not allowed ... and you could add a message/text to the customer to Call for shipping ...

However, now what happens to the customer's cart of products as they call you and finish the order over the phone but their cart still has the products in it for next time that they login ... :unsure:

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!

31 Jan 2010, 5:40 PM
#4
richardh avatar

richardh

New Zenner

Join Date:
Jul 2008
Location:
Whitley Bay, England
Posts:
29
Plugin Contributions:
0

Re: Maximum weight by zones?

Hi this is just what I am trying to do I'm using several table rates but want to limit one table rate to 2kg,

can you guide on the code I should put in table.php (in modules) to do this

$this->enabled is I guess part of it

thanks

richard

.

1 Feb 2010, 1:24 AM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Maximum weight by zones?

Underneath the $this->enabled IF statement, add this IF statement:

// bof: do not show on orders of weight over 2 lbs
    if (IS_ADMIN_FLAG == false) {
      global $cart;
      if ($_SESSION['cart']->show_weight() > 2) {
        $this->enabled = false;
      }
    }
// eof: do not show on orders of weight over 2 lbs

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!

2 Feb 2010, 8:22 PM
#6
richardh avatar

richardh

New Zenner

Join Date:
Jul 2008
Location:
Whitley Bay, England
Posts:
29
Plugin Contributions:
0

Re: Maximum weight by zones?

Spot on, saved me a lot of time

Bought you a couple of beers rather than a coffee!

Cheers

richard

2 Feb 2010, 9:16 PM
#7
richardh avatar

richardh

New Zenner

Join Date:
Jul 2008
Location:
Whitley Bay, England
Posts:
29
Plugin Contributions:
0

Re: Maximum weight by zones?

sorry to bother you again, can I add the tare weight in also, I think that is just the product weight, I add about 15% for packaging

I guess there is a total weight variable instead of below

show_weight()

cheers

richard

2 Feb 2010, 9:36 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Maximum weight by zones?

That would need to be done differently, for example in the Table Rate shipping module, you would change the code, around line 139, from:

    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
    'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));

to read:

// bof: do not show on weight over 2
if ($shipping_weight > 2) {
  // do not show it
} else {
    $this->quotes = array('id' => $this->code,
    'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE . $show_box_weight,
    'methods' => array(array('id' => $this->code,
    'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,
    'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));
}
// bof: do not show on weight over 2

This way, the $shipping_weight is used and that includes the Tare Weight settings ...

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!

4 Feb 2010, 9:08 PM
#9
richardh avatar

richardh

New Zenner

Join Date:
Jul 2008
Location:
Whitley Bay, England
Posts:
29
Plugin Contributions:
0

Re: Maximum weight by zones?

Perfect, thanks
I thinks others may also find this post very useful
all the best
Richard