2

Can I override the login template only for my brazilian shop? The template that I want to override is located here:

app/design/frontend/rwd/default/template/persistent/customer/form/login.phtml

  • If you are using same theme then you cannot override it. Are you using multiple store? What do you want to change in this login.phtml? – Sukumar Gorai Sep 13 '18 at 14:48
  • I have multiple stores. I want to remove the bulletpoints from an ul, but only for the Brasilian shop – Borche Glafche Sep 13 '18 at 14:54
  • Are you using rwd/default for other stores? – Sukumar Gorai Sep 13 '18 at 14:57
  • Hello @BorcheGlafche did you try my solution ? – Pawan Sep 13 '18 at 17:03
  • @BorcheGlafche Can you update if any of the answers are working? – Sukumar Gorai Sep 14 '18 at 12:05
1

Simply you can do:

if($store = Mage::app()->getStore()=='store_code'){ // you need to chnage store code
    your code for specific store;
}else{
    Default code for other store;
}
|improve this answer|||||
1

In two cases:

  1. If you are using just this theme rwd/default brazilian shop as store view or website.

  2. you can do it via xml properly like this :

xml

<customer_account_login>
    <reference name="customer_form_login">
        <action method="setTemplate">
            <template helper="your_module/getFormLoginTemplate" />
        </action>
    </reference>
</customer_account_login>

Helper/Data.php

public function getFormLoginTemplate()
{
    $storeCode = Mage::app()->getStore()->getCode();
    $brazilianShop_code = 'br'; //for exemple
    switch($storeCode)
    {
        case $brazilianShop_code:
            return "persistent/customer/form/login2.phtml";
            break;
        default:
            return "persistent/customer/form/login.phtml";
            break;
    }

}

You create your custom form in : app/design/frontend/rwd/default/template/persistent/customer/form/login2.phtml

|improve this answer|||||
1

If you are using rwd/default theme for all websites then you need to create one folder like below:

app/design/frontend/rwd/brasil/

and copy the below file:

app/design/frontend/rwd/default/template/persistent/customer/form/login.phtml

to

app/design/frontend/rwd/brasil/template/persistent/customer/form/login.phtml

Then assign it in admin like below:

  1. Goto System -> Configuration
  2. Goto Design from left panel
  3. Change the Current Configuration Scope to Brasil store and assign it like below: enter image description here

Do your customization to the below file for your brasilian store:

app/design/frontend/rwd/brasil/template/persistent/customer/form/login.phtml

Flush the cache. And test.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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