コミュニティプールテンプレートをオーバーライドしようとしています

magento.stackexchange https://magento.stackexchange.com/questions/3399

質問

そのため、インストールした拡張機能からテンプレートをオーバーライドしようとしています。これがテンプレートの場所です:

app/design/frontend/enterprise/default/template/affiliatepluscoupon/affiliatepluscoupon.phtml

これが私がそれを無効にした方法です:

config.xml:

<frontend>
  <updates>
    <blizzardlabs_affiliateplusext>
      <file>blizzardlabs_affiliateplusext.xml</file>
    </blizzardlabs_affiliateplusext>
  </updates>      
</frontend>

レイアウト:

app/design/frontend/enterprise/default/layout/blizzardlabs_affiliateplusext.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <affiliatepluscoupon_index_index>
        <reference name="affiliatepluscoupon">
            <action method="setTemplate">
                <template>affiliateplusext/affiliatepluscoupon.phtml</template>
            </action>
        </reference>
    </affiliatepluscoupon_index_index>
</layout>

参照用の元のレイアウトは次のとおりです。

app/design/frontend/enterprise/default/layout/affiliatepluscoupon.xml:

<?xml version="1.0"?>
<layout version="0.1.0">
    <affiliateplus_default>
        <reference name="account_navigator">
            <action method="addLink" translate="label" module="affiliatepluscoupon">
                <name>banners</name><path>affiliatepluscoupon/index/index</path><label><![CDATA[Coupon]]></label><disabled helper="affiliatepluscoupon/couponIsDisable" /><order>40</order>
            </action>
        </reference>
    </affiliateplus_default>
    <affiliatepluscoupon_index_index>
        <update handle="affiliateplus_default" />
        <reference name="head">
            <action method="addCss"><styleSheet>css/magestore/affiliatepluscoupon.css</styleSheet></action>
        </reference>
        <reference name="content">
            <block type="affiliatepluscoupon/affiliatepluscoupon" name="affiliatepluscoupon" template="affiliatepluscoupon/affiliatepluscoupon.phtml" />
        </reference>
    </affiliatepluscoupon_index_index>
</layout>

私は自分がすべきことをしたように感じますが、それを拾いません。私は手動でキャッシュ(とにかくオフ) / ctrl f5を洗い流しましたが、それでも何もありませんでした。これらすべての長い名前で、私はおそらくどこかで綴りのエラーを見ていますが、私はそれを見つけることができません。何か助け?!

役に立ちましたか?

解決

テンプレートファイルを呼び出すクラスをオーバーライドする必要があるようです。

http://inchoo.net/ecommerce/magento/how-to-override-magento-admin-view-template-files-quick-and-dirty-way/

より具体的には、使用するテンプレートファイルを設定するブロックをオーバーライドする必要があります...

https://stackoverflow.com/questions/10206649/properly-override-a-admin-template-file-in-magento

ただし、次のリンクは、クラスをオーバーライドせずに可能であることを示唆しています...

https://stackoverflow.com/questions/9787190/how-to-override-the-admin-template-file-in-magento

ライセンス: CC-BY-SA帰属
所属していません magento.stackexchange
scroll top