0

So, I am trying to override a template from an extension we have installed. This is the template location:

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

This is how I have gone about overriding it:

config.xml:

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

Layout:

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>

Here is the original layout for reference:

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>

I feel like I have done what I should but its not picking it up. I manually flushed cache (its off anyway) / ctrl f5 and still nothing. With all these long names im probably looking at a spelling error somewhere but i can't find it. Any help?!

0

It appears that you will need to override the class that calls the template file.

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

More specifically, you need to override the block that sets the template file to use...

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

However, the following link suggests it is possible without overriding any classes...

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

  • Thanks for the help I was able to figure it out using these...I'll update my question with what I did later. – Bill Garrison May 2 '13 at 18:38

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.