xml layout - Magento - unexpected template being used -
to cater magento's (1.7.0.2) omission of discount code in checkout process (madness!), installed small extension add same. works fine, owing magento's limited support enhancing individual blocks, extension has provided whole new checkout/onepage/progress.phtml file implemented quite different theme (package) supplied progress box. deal have merge extension one-page progress.phtml theme's progress.phtml file , use instead.
but that's not question! question why store using extension progress.phtml file instead of theme's progress.phtml file?
i thought getting grips magento's ubercomplex templates, not! fix need revert theme's progress.phtml. elaborate...
the extension installs frontend/base/default , includes layout xml specifies:
<layout> <checkout_onepage_index translate="label"> <reference name="checkout.onepage"> <block type="greenacorn_checkoutcoupon/onepage_coupon" name="greenacorn_checkoutcoupon.onepage.coupon" as="coupon" template="greenacorn/checkoutcoupon/onepage/coupon.phtml"/> </reference> <reference name="checkout.progress"> <action method='settemplate'> <template>greenacorn/checkoutcoupon/onepage/progress.phtml</template> </action> </reference> </checkout_onepage_index> <checkout_onepage_progress> <reference name='root'> <action method='settemplate'> <template>greenacorn/checkoutcoupon/onepage/progress.phtml</template> </action> </reference> </checkout_onepage_progress> </layout>
can explain why develper has apparently set progress template twice?
now theme has following specified in frontend/[theme]/default/layout/checkout.xml
<checkout_onepage_progress> <!-- mage_checkout --> <remove name="right"/> <remove name="left"/> <block type="checkout/onepage_progress" name="root" output="tohtml" template="checkout/onepage/progress.phtml"> <block type="checkout/onepage_payment_info" name="payment_info"> <action method="setinfotemplate"><method></method><template></template></action> </block> </block> </checkout_onepage_progress>
my understanding stuff defined in configured theme takes precedence on stuff defined in frontend/default takes precedence on stuff defined in frontend/base. how template defined in extension taking precedence on template defined in theme?
checkout/index , checkout/progress 2 different pages: that's why developer set both them.
there should .xml file (maybe /app/code/community/greenacorn/checkoutcoupon/etc/config.xml) defining layout overwrites, in node like:
<layout> <updates> <extensionname> <file>developer_extensionname.xml</file> </extensionname> </updates> </layout>
Comments
Post a Comment