Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > How to Require Phone number in E-commerce checkout View modes: 
User avatar
Member
Member
eyesea69-gmail - 6/2/2010 10:15:00 PM
   
How to Require Phone number in E-commerce checkout
I am trying to make the phone number a required field in the shopping cart check out. I have found the validators for the form in ShoppingCartOrderAdresses.ascx.cs at line 881. In the section below I don't know where the ResHelper.GetString is coming from so that I can add one for the Billing Phone.
        Validator val = new Validator();
// check billing part of the form
string result = val.NotEmpty(txtBillingName.Text, ResHelper.GetString("ShoppingCartOrderAddresses.BillingNameErr"))
.NotEmpty(txtBillingAddr1.Text, ResHelper.GetString("ShoppingCartOrderAddresses.BillingAddressLineErr"))
.NotEmpty(txtBillingCity.Text, ResHelper.GetString("ShoppingCartOrderAddresses.BillingCityErr"))
.NotEmpty(txtBillingZip.Text, ResHelper.GetString("ShoppingCartOrderAddresses.BillingZIPErr")).Result;

if (result == "")
{


I am thinking that I just need to add a line like this:

.NotEmpty(txtBillingPhone.Text, ResHelper.GetString("ShoppingCartOrderAddresses.BillingPhoneErr"))

but don't know where to wire it up otherwise.
Thanks.

User avatar
Member
Member
eyesea69-gmail - 6/12/2010 2:25:38 PM
   
RE:How to Require Phone number in E-commerce checkout
Okay - they pointed me to the bit I was missing:


"Please note that we use the keys for localization expressions and you use the string hard-coded. You can create a new key and appropriate translations in:

Site Manager -> Development -> UI Cultures.

Please see here: http://devnet.kentico.com/docs/devguide/configuring_multilingual_ui.htm for more details."