1

I have a multi-store set up on v1.7.0.2.

I'm looking to display the extra address fields (available in base/default/template/persistent/customer/form/register.phtml) for the customer registration route `customer_account_create on my "trade" store only.

I've added the following to the "trade" store layout handle with no luck.

<STORE_trade>
    <reference name="customer_form_register">
        <action method="setShowAddressFields">
            <value>true</value>
        </action>
    </reference>
</STORE_trade>

I can get both stores to display the extra fields if I reference the route layout handle, however this is not what i'm looking for :(

<customer_account_create>
    <reference name="customer_form_register">
        <action method="setShowAddressFields">
            <value>true</value>
        </action>
    </reference>
</customer_account_create>

I'm not sure if I have referenced my update handle wrong or I'm going about it the wrong way.

Don't really want to use a template store hack...

2 Answers 2

1

It really would be awesome if Magento allowed composite handle logic!

That said, why not specify a custom layout XML theme for your "trade" store and place this update in the local.xml file there? The only objection to this would be that you would prefer not to have mostly duplicated local.xml files for two separate store scopes. If that's the case, simply create a simple module which adds a new layout update file to the mix and place it in the "trade" store's custom layout theme.

1
  • The simple module solution works quite nicely! thank you Jan 14, 2014 at 20:29
0

Where is your layout handle stored? in which xml file? The code is correct, so the problem is that the file is not loaded or the layout handle is wrong. You can check easily for example using mgt toolbar: https://github.com/mgtcommerce/Mgt_Developertoolbar

if you use modman, use my fork: https://github.com/Schrank/Mgt_Developertoolbar

If the layout handle is correct and the file is loaded the last thing I can imagine is, that the block doesn't exists, when the method is called, but I don't think this is the case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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