Guest Posted December 20, 2003 Posted December 20, 2003 Hi - Is there a way to restrict shipping options if the address in question is a PO Box? I tried searching this group, but searching for "PO BOX" gives me an error. I'm guessing it's too short of a search string. Adding "shipping" gives all kinds of answers about shipping, but none about PO Boxes... Since UPS can't ship to a PO Box, I'd like to restrict that from showing up if the address is a PO Box. Do I need to edit code to do this or is there an easier way? Thanks!
Guest Posted December 20, 2003 Posted December 20, 2003 hrm...I used this code: $test = strtolower(str_replace(".","", $street_address));//define $test as $street_address without periods and in all lower case ("P.O. Box" becomes po box) if (substr_count($test, "po") == 0 && substr_count($test, "box") == 0)//does $test contain "po" and "box"? to check for an address that was a PO Box. That gets you halfway...but how to disable UPS shipping for that I don't know. I've put up a statement that says USPS is the only option for those with a PO Box, so far that's been fine for me.
dgmyers Posted April 21, 2005 Posted April 21, 2005 Check PO Box contribution at: http://www.oscommerce.com/community/contributions,3134
kawagner Posted August 11, 2005 Posted August 11, 2005 This contribution lists 2 files to be altered - I can alter the fisrt one listed but what is supposed to be in the shipping.php file I do not have there. Any ideas? Can anyone help. Kim
kawagner Posted August 15, 2005 Posted August 15, 2005 Hello, Thank you for the location. I modified the catalog/checkout_shipping.php file with your step one, then did a test. It seems to have taken out my usps shipping option all together. It does not offer it wherther it is a pos box or not. Am I modifying the correct file? I'm not sure why this is doing that. So for now I just added to the screen that UPS does not deliver to PO Boxes or APO/FPO military addresses. Thank you - Kim Kim
Recommended Posts
Archived
This topic is now archived and is closed to further replies.