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


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

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar

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 >=

ImageImageImage

SEO MEGA KIT PLUS - Get your site ranking higher in the search engines
Better Product SEO URL's - Perfectly structured product links
SEO URL's Route Editor PRO - Make ANY url on your site have clean keywords - even third party extensions (remove index.php)


Image


User avatar

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 !


Posts

Joined
Mon Feb 02, 2009 10:13 am