3

I am relatively new to magento. I would like to place customer account registration page in two columns. Preferably, left side with First Name, Last Name, Email and password. Right Side, Address Fields.

I could find below code from layout/customer.xml for RWD theme.

Customer Account Registration Form

    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
            <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
                <label>Form Fields Before</label>
            </block>
        </block>
    </reference>
</customer_account_create>

Is it possible to make changes to above code and split the forms into two columns?

Thank you

1 Answer 1

5

You cannot split the form into 2 columns via the layout xml. The term "columns" has a different meaning it Magento. A column acts like a container for the elements inside it and you need all the fields to be in the same container because they should be wrapped in a form.
But what you can do is to edit the template customer/form/register.phtml and change the markup to fit your needs. Copy the file from app/design/frontend/base/default/template/customer/form/register.phtml to your theme app/design/frontend/{package}/{theme}/template/customer/form/register.phtmlkeeping the same path and work your magic in the clone.

4
  • Cool! I will give it a try.
    – harry
    Dec 5, 2014 at 13:42
  • I have placed register.phtml under the above path but I think it still considers base/default file! any comments? I have also removed file from app/design/template/base/default/template/customer/form/register.phtml but no changes at frontend. cleaned cache, still no changes!
    – harry
    Dec 6, 2014 at 9:29
  • 1
    Turn on the template path hints to see what templates are actually used. Most probably the on from the persistent folder is used. Don't ask why magento uses this. I'm really puzzled myself about why the persistent module works this way.
    – Marius
    Dec 6, 2014 at 13:30
  • Yes, you are right. template path shows 'persistent'
    – harry
    Dec 8, 2014 at 9:29

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.