skip to Main Content

I was following this answer,

https://[stackoverflow.com/questions/12936608/magento-howto-overwrite-one-template-file][1]

The file I’m trying to overwrite is,

app/design/frontend/base/default/template/customer/form/register.phtml

I copied that file to

app/design/frontend/mycompany/default/template/customer/form/register.phtml

I set,

System -> Configuration -> Design -> Package = mycompany

I flushed the buffer and refreshed and so forth, but

app/design/frontend/base/default/template/customer/form/register.phtml

is still being used. According to the answers, this is supposed to overwrite the base template, but it doesn’t. What do I need to do to make the Magento used the new register.phtml?

2

Answers


  1. Chosen as BEST ANSWER

    I was able to make this work by modifying local.xml from,

    <customer_account_login>
      <reference name="customer_form_login_1">
          <action method="setTemplate">
             <template>mycompany/login/login.phtml</template>
          </action>
          <block type="persistent/form_remember" name="persistent.remember.me" template="persistent/remember_me.phtml" />
          <block type="core/template" name="persistent.remember.me.tooltip" template="persistent/remember_me_tooltip.phtml" />
       </reference>
    
       <reference name="root">
         <action method="setTemplate"><template>page/new-login.phtml</template></action>
       </reference>
    
        <reference name="content">
           <block type="customer/form_login" name="customer_form_login_new" template="mycompany/login/login.phtml" />
        </reference>
    
        <reference name="customer_form_login">
           <remove name="persistent.remember.me"/>
           <remove name="persistent.remember.me.tooltip"/>
        </reference>
    
        <reference name="content">
           <remove name="customer_form_login"/>
        </reference>
    
    </customer_account_login>
    

    To the following,

    <customer_account_login>
        <reference name="customer_form_login_1">
            <action method="setTemplate"><template>mycompany/login/login.phtml</template></action>
        <action method="setTemplate"><template>mycompany/form/register.phtml</template></action>
        <block type="persistent/form_remember" name="persistent.remember.me" template="persistent/remember_me.phtml"/>
        <block type="core/template" name="persistent.remember.me.tooltip" template="persistent/remember_me_tooltip.phtml" />
           </reference>
    
       <reference name="root">
            <action method="setTemplate"><template>page/new-login.phtml</template></action>
        </reference>
    
        <reference name="content">
        <block type="customer/form_login" name="customer_form_login_new" template="mycompany/login/login.phtml" />
        <block type="customer/form_register" template="mycompany/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>
    
        <reference name="customer_form_login">
        <remove name="persistent.remember.me"/>
        <remove name="persistent.remember.me.tooltip"/>
        </reference>
    
        <reference name="customer_form_register">
        <remove name="persistent.remember.me"/>
        <remove name="persistent.remember.me.tooltip"/>
        </reference>
    
        <reference name="content">
        <remove name="customer_form_login"/>
        <remove name="customer_form_register"/>
        </reference>
    
    </customer_account_login>
    

    and I copied app/design/frontend/base/default/template/customer/form/register.phtml to app/design/frontend/base/default/template/mycompany/form/register.phtml.


  2. Firstly you will have to check which package and theme is using in frontend and then copied the file from

    app/design/frontend/base/default/template/customer/form/register.phtml to the path

    app/design/frontend/mycompany/default/template/customer/form/register.phtml

    (which package is using on frontend. )

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search