Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-06-2003 02:15:29

Guest
Guest

No P.O. Box for shipping address

I would like to stop P.O. boxes from being entered on the shipping address line 1 field.  What's the best way?

 

#2 01-06-2003 12:40:40

Will
Member
Registered: 02-26-2003
Posts: 493
Website

Re: No P.O. Box for shipping address

Yes, this would be a very handy modification to have for those of us that use UPS not USPS on the web site.

Will



Will

Offline

 

#3 01-12-2003 14:41:12

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19756
Website

Re: No P.O. Box for shipping address

Probably the easiest way is to login to the administrator and under HTML Pages & Elements | Manage Site Elements | Update Checkout - Intro Header right below the text:

###

Please complete the fields below to checkout.  Once all of the required fields are complete, click the 'Submit' button to continue.<BR><BR>

###

Add in something like this:

###

<B>Please note: We ship via UPS.  Please do not enter a P.O. Box number in the shipping address field below.</B><BR><BR>

###
___________________________

Nick Hendler
Webmaster, Kryptronic, Inc.


Nick Hendler

Offline

 

#4 01-13-2003 20:15:58

Guest
Guest

Re: No P.O. Box for shipping address

What if we wanted to implement an error screen either throught the Perl or Javascript so that it catches for some of the PO Box error conditions.  Some of the error conditions may be:
- P.O. Box
- PO Box
- P.O Box
- Box

Using this error checking, we may be able to eliminate 90% of the PO Box shipping address that we get.  Our UPS integration does not allow for PO Box shipping.

 

#5 01-16-2003 11:36:55

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19756
Website

Re: No P.O. Box for shipping address

It would probably be easiest doing this with Perl rather than JavaScript.  In the file ./cgi-bin/library/modules/ste_usr.pl look in the routine 'ste_usr_check' for the line:

###

my $temp_fd_value = $q->param($form_field);

###

And right behind it add:

###

if ($form_field eq "trackitem_shipaddressone" && ($temp_fd_value =~ /P.O. Box/ || $temp_fd_value =~ /PO Box/ || $temp_fd_value =~ /P.O Box/ || $temp_fd_value =~ /Box/)) {

$temp_fd_value = "";

} ######### End of if statement.

###

That will delete any shipping addresses (Line 1) that contain those phrases.  The user will be forced to re-enter their info.

___________________________

Nick Hendler
Webmaster, Kryptronic, Inc.


Nick Hendler

Offline

 

#6 01-16-2003 19:54:27

Guest
Guest

Re: No P.O. Box for shipping address

I made the mod, but looks to have no effect.

Here's what the code looks like:




my ($fd_value,$form_field) = @_;

my $temp_fd_value = $q->param($form_field);

### Check for POBox

if ($form_field eq "trackitem_shipaddressone" && ($temp_fd_value =~ /P.O. Box/ || $temp_fd_value =~ /PO Box/ || $temp_fd_value =~ /P.O Box/ || $temp_fd_value =~ /Box/)) {

$temp_fd_value = "";

} ######### End of if statement.

###

if (defined($temp_fd_value)) {

$temp_fd_value = database_format($temp_fd_value);

 

#7 01-20-2003 12:11:43

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19756
Website

Re: No P.O. Box for shipping address

Are you entering:

P.O. Box
PO Box
P.O Box
Box

In the shipping address?  Are you just choosing to ship to the billing address?  If that's the case, I may have to look at the code again.

___________________________

Nick Hendler
Webmaster, Kryptronic, Inc.


Nick Hendler

Offline

 

#8 01-22-2003 13:11:01

Guest
Guest

Re: No P.O. Box for shipping address

I tried it in only the instance where I chose the shipping address is the same as the billing address.

I have not tried the instance where the shipping address is different from the billing address.

I am using the 4 variations of PO Box, but each time it is just letting me go straight to the next screen.

In practice, the mod should handle both instances when the shipping address is same as Billing Address and when it is different.

thanks for looking into this.

 

#9 01-28-2003 10:12:11

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19756
Website

Re: No P.O. Box for shipping address

To pick that up in the billing address to, change the line:

###

if ($form_field eq "trackitem_shipaddressone" && ($temp_fd_value =~ /P.O. Box/ || $temp_fd_value =~ /PO Box/ || $temp_fd_value =~ /P.O Box/ || $temp_fd_value =~ /Box/)) {

###

to read:

###

if (($form_field eq "trackitem_shipaddressone" && ($temp_fd_value =~ /P.O. Box/ || $temp_fd_value =~ /PO Box/ || $temp_fd_value =~ /P.O Box/ || $temp_fd_value =~ /Box/)) || ($form_field eq "tracking_addressone" && ($temp_fd_value =~ /P.O. Box/ || $temp_fd_value =~ /PO Box/ || $temp_fd_value =~ /P.O Box/ || $temp_fd_value =~ /Box/)) {

###
___________________________

Nick Hendler
Webmaster, Kryptronic, Inc.


Nick Hendler

Offline

 

#10 03-18-2003 11:46:38

BooBoo
Member
From: Anaheim, CA
Registered: 07-25-2003
Posts: 147
Website

Re: No P.O. Box for shipping address

How do you handle the situation where the customer has a PO Box for his billing address?  CC Companies allow this.

We're all humanary stew, if we don't pledge allegiance to the Black Widow!


--
Keith Roberts
IT Manager
Laptops For Less, Inc
keith@getadeal.com
<a href="http://www.laptopsforless.com">Your source for laptop batteries, pda batteries, digital camera batteries, cell phone batteries, and accessories</a>

Offline

 

#11 07-01-2003 17:13:03

kevbo
Member
Registered: 01-13-2002
Posts: 52

Re: No P.O. Box for shipping address

Anyone figout out a solutoin to Boo's question here? I was looking to implement the no shipping allowed to PO Boxes also, but allow it as billing address.

NOTE there needs to be an additional ) added in the code above such that it looks like this:

|| $temp_fd_value =~ /Box/))) {

Offline

 

#12 07-01-2003 19:14:29

kevbo
Member
Registered: 01-13-2002
Posts: 52

Re: No P.O. Box for shipping address

In the meatime here's sort of a workaround we are using.

I've added the code nick suggested for both billing and shipping and noted at the top of the page that we do not SHIP to PO Boxes.

I then instructed the customer to use 'po_box' as the name to use for billing, thus bypassing Nick's list and not producing the error.  I then informed the customer that any orders requesting shipment to po boxes will be cancelled in case they try to use the 'po_box' bypass as a slip thru.

i know this isn't very sophisticated, but it helps for now until a better solution comes around.

Offline

 

#13 07-01-2003 20:31:33

PinkPanther
Member
From: USA
Registered: 07-11-2003
Posts: 216

Re: No P.O. Box for shipping address

Kevbo,

This is what did for now and it seems to work well.

Kay

Offline

 

Board footer