0

I'm new to Magento, I have been stuck with this problem for a while. I want to create a custom URL for VIP members to login. I'm trying to create a new login page with a new module because the login process is not same as default process. My login page is not rendering correctly.

Module download link : https://drive.google.com/open?id=0B3l22y1w8j8_cmFkVnVZcUNzRUE

Please point out any mistakes I've made in my code please.

0

Use this Module -

app/etc/modules/Ifs_VipMember.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Ifs_VipMember>
      <active>true</active>
      <codePool>local</codePool>
      <version>0.1.0</version>
    </Ifs_VipMember>
  </modules>
</config>

app/code/local/Ifs/VipMember/Block/Index.php

class Ifs_VipMember_Block_Index extends Mage_Core_Block_Template{   

}

app/code/local/Ifs/VipMember/controllers/IndexController.php

 class Ifs_VipMember_IndexController extends Mage_Core_Controller_Front_Action{

  public function IndexAction() {

  $this->loadLayout();   
  $this->getLayout()->getBlock("head")->setTitle($this->__("VipLogIn"));
        $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
    $breadcrumbs->addCrumb("home", array(
              "label" => $this->__("Home Page"),
              "title" => $this->__("Home Page"),
              "link"  => Mage::getBaseUrl()
       ));

    $breadcrumbs->addCrumb("viplogin", array(
              "label" => $this->__("VipLogIn"),
              "title" => $this->__("VipLogIn")
       ));

    $this->renderLayout(); 

  }
}

app/code/local/Ifs/VipMember/etc/config.xml

  <?xml version="1.0"?>
<config>
  <modules>
    <Ifs_VipMember>
      <version>0.1.0</version>
    </Ifs_VipMember>
  </modules>
  <frontend>
    <routers>
      <vipmember>
        <use>standard</use>
          <args>
            <module>Ifs_VipMember</module>
            <frontName>vipmember</frontName>
          </args>
      </vipmember>
    </routers>
        <layout>
          <updates>
            <vipmember>
              <file>vipmember.xml</file>
            </vipmember>
          </updates>
        </layout>
  </frontend>
  <global>
    <helpers>
      <vipmember>
        <class>Ifs_VipMember_Helper</class>
      </vipmember>
    </helpers>
    <blocks>
      <vipmember>
        <class>Ifs_VipMember_Block</class>
      </vipmember>
    </blocks>
  </global>
</config> 

app/code/local/Ifs/VipMember/Helper/Data.php

class Ifs_VipMember_Helper_Data extends Mage_Core_Helper_Abstract
{
}

app/design/frontend/base/default/layout/vipmember.xml

<?xml version="1.0"?>   
    <layout version="0.1.0">   
      <vipmember_index_index>   
        <reference name="root">   
          <action method="setTemplate"><template>page/1column.phtml</template></action>   
        </reference>   
        <reference name="content">   
          <block type="vipmember/index" name="vipmember_index" template="vipmember/index.phtml"/>   
        </reference>   
      </vipmember_index_index>   
    </layout>   

app/design/frontend/base/default/template/vipmember/index.phtml

 <!-- test -->
  • I have updated the source exactly you mentioned, Im getting a blank content. Header and footer is loading but not the content. – user1989 Apr 20 '17 at 13:41
  • You have to create custom code for login in index.phtml. After that you can see the content in frontend. Also please clear the cache from admin panel. – Soumik Rana Apr 21 '17 at 6:13

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.