Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento registration form

I'm starting with magento and i'm trying to modify a template. Right now the registration form has a first and last name and I want it to have only the first name. I checked the code and I found something on a file "template/persistent/customer/form/register.phtml" which has all fields for the form, but for the first and last name it has this piece of code:

<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>

Is there any file where I should setup the field of the registration form?

Thanks in advance.

like image 616
Ricardo Neves Avatar asked Apr 17 '14 15:04

Ricardo Neves


1 Answers

You need to navigate to template/customer/widget/name.phtml. If this doesn't exist in your theme, copy it from the default into the same folder structure.

You will find a <div class="field name-lastname"> with the label and input that you can comment out.

like image 121
RichTea Avatar answered Oct 29 '22 17:10

RichTea