0

I would like to add alphabet validation for first and last name field in onepage checkout billing section.

But unable to find the template being loaded for this section. Other fields are being loaded from

base/default/template/persistent/checkout/onepage/billing.phtml

How to find the template for first and last name fields?

1 Answer 1

1

In my magento instalation the template for first name and last name, in checkout, is template/customer/widget/name.phtml

It is added in template/persistent/checkout/onepage/billing.phtml as

`<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>`

under

<li id="billing-new-address-form"...>

But try to activate template path hints and you will see which template is responsible to rendering this fields.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.