![]() |
Making fields required in OPC |
Post Reply ![]() |
Author | |
Guests ![]() Guest ![]() |
![]() ![]() ![]() ![]() ![]() 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. |
|
![]() |
|
Greg Dinger ![]() Certified ProductCart Developers ![]() ![]() Joined: 23-September-2006 Location: United States Status: Offline Points: 238 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Guests ![]() Guest ![]() |
![]() ![]() ![]() ![]() ![]() |
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? |
|
![]() |
|
Guests ![]() Guest ![]() |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
ProductCart ![]() Admin Group ![]() ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Guests ![]() Guest ![]() |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
katharina ![]() Senior Member ![]() ![]() Joined: 25-October-2005 Location: United States Status: Offline Points: 0 |
![]() ![]() ![]() ![]() ![]() |
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 ******************* |
|
![]() |
|
Matt ![]() Moderator Group ![]() Joined: 20-July-2006 Location: United States Status: Offline Points: 73 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
Guests ![]() Guest ![]() |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |