Post by leatherboy » Sat Mar 06, 2021 2:27 am

Hi.
I am using Weight based Shipping. I have 3 tabs based on Geo Zones.
The first is Courier that cover all country up to 10Kg. The costs is like:
0.1:3.50,1:3.50,2:5.50,3:5.50,4:7.50,5:7.50,6:9.50,7:9.50,8:11.50,9:11.50
The other two cover parts of the country only for >10Kg orders with flat cost.
That means I have to enter something like this:
10:12.20,99999:12.20
But how could I write that these 2 starts from 10kg. I don't want to participate in the checkout when I have 5kg in the order. It must ignore 0-9kg.

Christos

Newbie

Posts

Joined
Fri Feb 12, 2016 2:32 am

Post by Cue4cheap » Sat Mar 06, 2021 7:57 am

leatherboy wrote:
Sat Mar 06, 2021 2:27 am
Hi.
I am using Weight based Shipping. I have 3 tabs based on Geo Zones.
The first is Courier that cover all country up to 10Kg. The costs is like:
0.1:3.50,1:3.50,2:5.50,3:5.50,4:7.50,5:7.50,6:9.50,7:9.50,8:11.50,9:11.50
The other two cover parts of the country only for >10Kg orders with flat cost.
That means I have to enter something like this:
10:12.20,99999:12.20
But how could I write that these 2 starts from 10kg. I don't want to participate in the checkout when I have 5kg in the order. It must ignore 0-9kg.

Christos
The way the default weight based shipping module is built is:
Up to:Cost
your example
0.1:3.50,1:3.50,2:5.50
up to 0.1 would cost 3.50
up to 1 would cost 3.50 (between > 0.1 to 1)
up to 2 would cost 5.50 (between > 1 to 2)

The built in doesn't exclude "until you hit a certain weight".
Therefore you would have to modify the code to "turn off" the module if the weight is less than 10Kg.
Mike
Last edited by Cue4cheap on Sat Mar 06, 2021 8:42 am, edited 1 time in total.

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Cue4cheap » Sat Mar 06, 2021 8:30 am

This is NOT the absolute best way to go about it but....
in catalog/model/extension/shipping/weight.php

You could find:

Code: Select all

 			} else {
				$status = false;
			}
and add after it:

Code: Select all

$weight = $this->cart->getWeight();
if ($weight < '10') { $status = false; }
Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by leatherboy » Sat Mar 06, 2021 5:28 pm

Cue4cheap wrote:
Sat Mar 06, 2021 8:30 am
This is NOT the absolute best way to go about it but....
in catalog/model/extension/shipping/weight.php

You could find:

Code: Select all

 			} else {
				$status = false;
			}
and add after it:

Code: Select all

$weight = $this->cart->getWeight();
if ($weight < '10') { $status = false; }
Mike
Thanks for the reply.
Using this code O.C. ignore 0-10 Kg generally.
But I need to use courier for 0-10 Kg for all Zones.
Could I write this code for a certain Geo Zone;

Christos

Newbie

Posts

Joined
Fri Feb 12, 2016 2:32 am

Post by Cue4cheap » Sat Mar 06, 2021 11:26 pm

leatherboy wrote:
Sat Mar 06, 2021 5:28 pm
Thanks for the reply.
Using this code O.C. ignore 0-10 Kg generally.
But I need to use courier for 0-10 Kg for all Zones.
Could I write this code for a certain Geo Zone;

Christos
Sounds like you need to have a second shipping method installed OR customize this differently.
Something along the lines of matching the geo_zone_id, or name, then turn it off for the zones you don't want to appear. The logic could be basically the same.

Code: Select all

if (($result['geo_zone_id'] == '5') && ($weight < '10') ) { $status = false; }
 
BUT you would need to know the geo_zone_id of the one you don't want to show or do the same logic for the name but you'll have to get the name in the "if statement" above and compare it to the name of the geo zone.

If you are not comfortable with the logic or messing with the code then the easiest might be to install another extension, or duplicate the current one you are using, and use it just for the two zones.

Mike

cue4cheap not cheap quality


Active Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Johnathan » Sun Mar 07, 2021 12:34 am

Weight & Volume-Based Shipping can do this, if you're interested. You can set the brackets non-consecutively, so you can leave some out if you want. For example, for certain geo zones you could do this:

10-9999 = 12.20

For your other geo zones, you could do this:

0-1 = 3.50
1-3 = 5.50
3-5 = 7.50
etc.

Feel free to take a look at the screenshots and demo site, and if you're interested let me know at www.getclearthinking.com/contact if you have any further questions.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 38 guests