Post by NoJoke » Tue Feb 14, 2012 6:39 am

I am wanting to know if I am able to hide USPS if the cart is over a certain weight. Since we are using UPS we typically would like anything 10 lbs and under to display USPS as a shipping method but if it hits 11 lbs to hide USPS from being able to be selected as a shipping method.
Last edited by NoJoke on Tue Feb 14, 2012 1:26 pm, edited 2 times in total.

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am

Post by NoJoke » Tue Feb 14, 2012 6:40 am

Any ideas on how to do this would be great

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am

Post by Qphoria » Tue Feb 14, 2012 12:26 pm

1. EDIT: catalog/model/shipping/usps.php

2. FIND:

Code: Select all

$postcode = str_replace(' ', '', $address['postcode']);
3. BEFORE, ADD:

Code: Select all

if ($pounds > 10) { return array(); }

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by NoJoke » Tue Feb 14, 2012 1:25 pm

Thanks for the reply it works great. Thanks for all your great help Qphoria

Active Member

Posts

Joined
Fri Oct 14, 2011 5:37 am
Who is online

Users browsing this forum: No registered users and 2 guests