1

Please some one dont close this as duplicate, no answers fixing my issue:

Im trying to create a new page in which login and register come together and will have custom fields.

Below is the my folder structure:

app
 - code
 - local
 - Php
 - Customer
 - etc
 - controllers
 - Model
app
 - design
 - frontend
 - default
 - php
 - layout
 - template

Below is the module config file:

app/code/local/php/Customer/etc/config.xml

<?xml version="1.0"?>
<config>
 <modules>
 <Php_Customer>
 <version>0.1.0</version>
 </Php_Customer>
 </modules>
 <frontend>
 <routers>
 <customer>
 <use>standard</use>
 <args>
 <modules>
 <php_customer before="Mage_Customer">Php_Customer</php_customer>
 </modules>
 </args>
 </customer>
 </routers>
 <layout>
 <updates>
 <customer module="Php_Customer">
 <file>php_customer.xml</file>
 </customer>
 </updates>
 </layout>
 </frontend>
</config>

Below is account controller:

app/code/local/php/Customer/controllers/AccountController.php

<?php
require_once 'Mage/Customer/controllers/AccountController.php';
class Php_Customer_AccountController extends Mage_Customer_AccountController
{
 public function loginAction(){
 die('Php Overriden');
 $this->loadLayout();
 $this->renderLayout();
 } 
}

Below is the layout config:

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

<?xml version="1.0"?>
<layout>
 <php_customer_account_login>
 <reference name="content">
 <block type="module/ablock" name="login" template="popup_login.phtml" />
 </reference>
 </php_customer_account_login>
</layout>

below is the template file:

app/design/frontend/base/default/template/popup_login.phtml

<p>HTML Rendered Successfully</p>

When I echo something in the controller its printing on the screen, So I understood module added. but the phtml file is not rendering.

Below is exception log file:

exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Php_Customer_Block_Login' in D:\wamp\www\promo\app\Mage.php:595

No error log captured.

asked Jun 3, 2015 at 11:50
1
  • check the error log and past it too Commented Jun 3, 2015 at 11:53

1 Answer 1

2
<block type="module/ablock" name="login" template="popup_login.phtml" />

change it

<block type="core/template" name="login" template="popup_login.phtml" />

if it is working. then create your block.

answered Jun 3, 2015 at 11:56
3
  • whats the difference between these two? Commented Jun 3, 2015 at 12:01
  • 1
    this is a big difference. this is core core/template block. other will be created by you. and i think you don't create the block and extend from that block. Commented Jun 3, 2015 at 12:02
  • yes I haven't created any Php/Customer/Block Its working after changing module/ablock to core/template Commented Jun 3, 2015 at 12:15

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.