Post by csleepg » Tue Oct 05, 2010 4:17 pm

hi,
I have using flat and weight shipping module in 1.4.9.1, however,i would like to implement a condition that if items weight > 1kg then the flat shipping option will not visible and only weight base shipping will available. Is this possible ? How ?
Last edited by i2Paq on Wed Oct 13, 2010 11:00 pm, edited 1 time in total.
Reason: Topic moved

New member

Posts

Joined
Mon Feb 02, 2009 10:13 am

Post by JAY6390 » Tue Oct 05, 2010 6:03 pm

Assuming your default weight is set to Kg, simply open

Code: Select all

/catalog/model/shipping/flat.php
FIND:

Code: Select all

$method_data = array(); 
on the line BEFORE it add:

Code: Select all

if($this->cart->getWeight() >= 1) $status = FALSE; 
This is untested but should work

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by JAY6390 » Tue Oct 05, 2010 6:07 pm

Just to note, the above will remove flat shipping if it's equal to 1Kg as well, if you only want it when it's greater than 1Kg, remove the = from the >=

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by csleepg » Wed Oct 20, 2010 4:00 pm

thanks jays,
it's just working great !

New member

Posts

Joined
Mon Feb 02, 2009 10:13 am
Who is online

Users browsing this forum: No registered users and 15 guests