0

If there are several errors, please specify all. Thank you

<?xml version="1.0" ?>
    <config>
        <modules>
            <RunwaySale_Merchandiser>
                <version>0.0.1</version>
            </RunwaySale_Merchandiser>
        </modules>
        <frontend>
            <routers>
                <merch>
                    <use>standard</use>
                    <args>
                        <module>RunwaySale_Merchandiser</module>
                        <frontName>merch</frontName>
                    </args>
                </merch>
            </routers>
        </frontend>
        <admin>
            <routers>
                <admin1112>
                    <use>admin</use>
                    <args>
                        <module>RunwaySale_Merchandiser</module>
                        <frontName>admin1112</frontName>
                    </args>
                </admin1112>
            </routers>
        </admin>
        <global>
            <blocks>
                <merch>
                    <class>RunwaySale_Merchandiser_Block</class>
                </merch>
                <adminhtml>
                    <rewrite>
                        <catalog_category_tree>RunwaySale_Merchandiser_Block_Adminhtml_Catalog_Category_Tree</catalog_category_tree>
                    </rewrite>
                </adminhtml>
            </blocks>
            <helpers>
                <runwaysalemerchandiser>
                    <class>RunwaySale_Merchandiser_Helper</class>
                </runwaysalemerchandiser>
            </helpers>
        </global>
        <adminhtml>
            <menu>
                <runwaysalemerchandiser module="runwaysalemerchandiser">
                    <title>runwaysalemerchandiser</title>
                    <sort_order>1</sort_order>
                    <action>admin1112/adminhtml_merch</action>
                </runwaysalemerchandiser>
            </menu>
            <layout>
                <updates>
                    <merch>
                        <file>runwaysale.xml</file>
                    </merch>
                </updates>
            </layout>
        </adminhtml>
    </config>

controllers/Adminhtml/MerchController.php

class RunwaySale_Merchandiser_Adminhtml_MerchController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }
}

app/design/adminhtml/default/default/layout/runwaysale.xml

<?xml version="1.0" ?>
    <layout version="0.1.0">
    <admin1112_merch_index>
        <reference name="content">
            <block type="merch/adminhtml" name="runwaysale" template="index.phtml" />
        </reference>
    </admin1112_merch_index>
    </layout>

Path template:

app/design/adminhtml/default/default/template/runwaysale/index.phtml

  • please try <block type="merch/adminhtml" name="runwaysale" template="runwaysale/index.phtml" /> in app/design/adminhtml/default/default/layout/runwaysale.xml – Moin Malek Nov 22 '17 at 14:00
1

You need to add the folder on runwaysale.xml

change this lign from

<block type="merch/adminhtml" name="runwaysale" template="index.phtml" />

to

<block type="merch/adminhtml" name="runwaysale" template="runwaysale/index.phtml" />

On template field you have to use the folder, without the folder runwaysale magento will try to find the file index.phtml on app/design/adminhtml/default/default/template/ and not on app/design/adminhtml/default/default/template/runwaysale/

Remember to clean the cache after this changes.

I hope this helps you

| improve this answer | |
  • thanks , but this don't working :( – Evgeniy Kapelko Nov 24 '17 at 10:22
  • <?xml version="1.0" ?> <layout version="0.1.0"> <admin1112_merch_index> <reference name="content"> <block type="merch/adminhtml" name="runwaysale" template="index.phtml" /> </reference> </admin1112_merch_index> </layout> – José Rodrigues Dec 4 '17 at 11:02
0

First of all i think that your Admin link its not correct, you should use something like this:

<adminhtml>
            <menu>
                <runwaysalemerchandiser module="runwaysalemerchandiser">
                    <title>runwaysalemerchandiser</title>
                    <sort_order>1</sort_order>
                    <action>adminhtml/admin1112</action>
                </runwaysalemerchandiser>
            </menu>
            <layout>
                <updates>
                    <merchandiser>
                        <file>runwaysale.xml</file>
                    </merchandiser>
                </updates>
            </layout>
        </adminhtml>

And on your layout you are using type="merch/adminhtml" to run the admin page but merch is defined only to frontend...

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