ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Making fields required in OPC
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Making fields required in OPC

 Post Reply Post Reply
Author
Message
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Topic: Making fields required in OPC
    Posted: 01-April-2010 at 7:31pm
I searched the WIKI best I could to see if this might have been covered there, but didn't find anything.

How to make fields required in the OPC? Had a brief look at it, but it's not like other forms in PC in this way (no surprise there, eh?).

Specifically, I need to make the phone number field required. Curious that it is a required field in the CP, but not on OPC.
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 01-April-2010 at 7:53pm
At line 118 of opc_updbilladdr.asp, we added this for the same requirement:
 
'gbdg mod - begin
if pcStrBillingPhone="" then
  pcErrMsg=pcErrMsg & "<li>"&dictLanguage.Item(Session("language")&"_opc_99")&"</li>"
end if
'gbdg mod - end
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 01-April-2010 at 8:24pm
Thanks, Greg. I guess that will work well enough for now.

Would actually like to get some pointers on making it function like the rest of the validation here.

I see in the language file that some thought was given to this:
items opc_js_16 through 18 have the language for the alerts if validation fails.

Perhaps EI forgot to finish this?
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 02-April-2010 at 8:28pm
Hamish? Massimo? Cedric? Any love here?

Given the stuff in the languages file, was this something that was slated, but didn't get finished? Something you are working on for v4.1? If so, then Greg's band-aid is fine enough to tide over until then.
Back to Top
ProductCart View Drop Down
Admin Group
Admin Group

ProductCart Team

Joined: 01-October-2003
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote ProductCart Quote  Post ReplyReply Direct Link To This Post Posted: 02-April-2010 at 9:24pm
Sean - in terms of the phone number specifically, it was not made required in v4, however it's already come up a few times... so we're looking at making it a variable in v4.1.

Recently, a Canadian customer asked about also making the Postal Code required for Canadian customers and to do that, a store simply needs to add their country code to the list at the top of the OPC page. For example:

Change:

var CountriesRequireZipCode="US,"
var CountriesRequireStateCode="US,"
var CountriesRequireProvince=""

To:

var CountriesRequireZipCode="US, CA"
var CountriesRequireStateCode="US,"
var CountriesRequireProvince=""

I guess that you are saying is that it would be nice for the store admin to have virtually total control over which fields they want to make required?

Regards,

Cedric Adams
Early Impact
The ProductCart Team

Home of ProductCart shopping cart software
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 02-April-2010 at 9:52pm
Well, I definitely thought about it, and it is pretty common in other shopping cart systems to select in the CP which Billing and Shipping fields you want to make required. I think it would be a good idea, but I wasn't throwing that in you lap here ;-)

However, there is a disconnect between the CP (where customer phone number is required) and the OPC (where it is not).

I was hoping for some pointers on using the same kind of authentication routine and display such as is used on other fields such as Name and Email.
Back to Top
katharina View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25-October-2005
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote katharina Quote  Post ReplyReply Direct Link To This Post Posted: 02-April-2010 at 10:00pm
One thing that would be great is to require phone numbers for international orders.  Currently the post office requires it on international shipments going to post boxes only, but more will be required soon.  UPS requires it on all international shipments.  
Katharina
*******************
www.GermanPlaza.com
*******************
Back to Top
Matt View Drop Down
Moderator Group
Moderator Group


Joined: 20-July-2006
Location: United States
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote Matt Quote  Post ReplyReply Direct Link To This Post Posted: 03-April-2010 at 1:59am
Hi Sean,

Open "onepagecheckoutJS.asp"

Replace:

            billcountry: "required",

With:

            billcountry: "required",
            billphone: "required",

Replace:

            billcountry: {
                required: "<%=dictLanguage.Item(Session("language")&"_opc_js_12")%>"
            },

With:

            billcountry: {
                required: "<%=dictLanguage.Item(Session("language")&"_opc_js_12")%>"
            },
            billphone: {
                required: "<%=dictLanguage.Item(Session("language")&"_opc_js_16")%>"
            },

We have already updated the control panel so it does not validate the phone number.  There is also an entry in our tracking system to make the validation optional.
Back to Top
Guests View Drop Down
Guest
Guest
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guests Quote  Post ReplyReply Direct Link To This Post Posted: 03-April-2010 at 2:36am
Now that's what I'm talkin bout!

Thanks, did just what I wanted it to do.

So, moving forward, the question is: to allow folks to assign what fields should be required (I would expect that settings here would apply to both the control panel and the OPC) in the control panel, or to just put up a wiki post here on how to make fields required or not requited.

Immediate, easy way is to go the wiki route, IMHO.

Seems to me that the current un-required field here would be the phone number field as that is a bit of data most needed to follow up on potentially fraudulent orders.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.