Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Making CMS_COM_Customer.CustomerPhone mandatory View modes: 
User avatar
Member
Member
m.rutter - 12/7/2011 8:28:38 AM
   
Making CMS_COM_Customer.CustomerPhone mandatory
Hi everybody,
I have an e-commerce site. During the customer registration process (inside the basket, new customer registration) I need to make the phone number mandatory and, if possible, I need to check the number format (for example: at least 8 digits, no spaces, etc.).

In Site Manager -> Development -> System Tables I can see the COM_Customer table but I cannot uncheck the "Allow empty value" (it's checked and grayed).

So my question is: how can I make that field mandatory? Should I customize the checkout process step (I guess the answer is no)?

Thank you.

Regards,
Marcello

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 12/8/2011 6:32:46 AM
   
RE:Making CMS_COM_Customer.CustomerPhone mandatory
Hello,

If you are talking about the phone entry on the checkout step with the billing address then this field is hard coded and not based on a form. That's why you will have to write a few lines of custom code to implement the phone number validation. You can find the file to modify in:

\CMSModules\Ecommerce\Controls\ShoppingCart\ShoppingCartOrderAddresses.ascx

Unchecking the "Allow empty value" checkbox on the given table would cause a an exception and wouldn't validate the field on the checkout process.

Best regards,
Boris Pocatko