0
votes

This is my first post here, so please forgive me in advance :)

I've been working on overriding the Customer module for some specific functionality depending on the user group; I want to duplicate and append to the user registration form that targets the specific user group.

I have successfully overridden and extended my way through the controller, model, and block classes that I would like to use, however when I override the block class, the layout i'm pointing to is no longer rendered.

Here's the relevant chunk of the layout code:

<customer_account_vcreate translate="label">
    <label>Customer Account Registration Form</label>
    <!-- Mage_Customer -->
    <remove name="right"/>
    <remove name="left"/>

    <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_vcreate>

I know that it just points to the regular block/template right now, but even that isn't loading. The block loads just fine (I can output from the constructor), it just seems that the layout file is not being loaded anymore.

I've also tried to override the login form with similar problems, can anyone help?

Geoff

EDIT - Here's a more complete question for the login block: Here's my config:

<?xml version="1.0"?>
<config>
<modules>
    <Izoox_Customer>
        <version>1.0.1</version>
    </Izoox_Customer>
</modules>
<frontend>
    <routers>
        <customer>
            <args>
                <modules>
                    <Izoox_Customer before="Mage_Customer">Izoox_Customer_Customer</Izoox_Customer>
                </modules>
            </args>
        </customer>
    </routers>
    <layout>
      <updates>
        <customer>
          <file>izooxcustomer.xml</file>
        </customer>
      </updates>
    </layout>
</frontend>
<global>
    <blocks>
        <customer>
            <rewrite><form_login>Izoox_Customer_Block_Form_Login</form_login>
            </rewrite>
        </customer>
    </blocks>
</global>
</config>

It works when I remove the block code from the above config, except then I'm not getting any of my custom code from the block.

Above I have overridden the Customer module to use my own code here, and have overridden the customer_login block with my own block. I can see that the custom block loads by echoing out of the _prepareLayout() function, but the view file (login.phtml) doesn't seem to load. Here's the layout (izooxcustomer.xml), which also loads fine.

<customer_account_login translate="label">
    <label>Customer Account Login Form</label>
    <!-- Mage_Customer -->


    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>

    <reference name="content">
        <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml"/>
    </reference>
</customer_account_login>

Am I missing something, or is this just not possible?

Thanks, Geoff

1

1 Answers

0
votes

Looks like you have your main layout tag misspelled. It should be <customer_account_create>. You have a 'v' in there before create.