[英]Magento: How to enable/disable module output per website level?
I would like to display an image in the onepage checkout payment methods section that would only show up in one of two website levels . 我想在onepage结帐付款方式部分中显示一个图片,该图片只显示在两个网站级别之一中 。 So I have three questions:
所以我有三个问题:
1) Am I correct to assume this change would be coded in app/design/frontend/default/mytheme/layout/checkout.xml ? 1)我是否正确假设此更改将在app / design / frontend / default / mytheme / layout / checkout.xml中编码?
2) if that is the correct file, what would the change be from: 2)如果这是正确的文件,更改将来自:
<!--
One page checkout payment methods block
-->
<checkout_onepage_paymentmethod>
<remove name="left"/>
<block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml">
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
</block>
</checkout_onepage_paymentmethod>
in order to point to, for example, checkout/onepage/payment/methods-site2.phtml when site2 is being used? 例如,当使用site2时,指向checkout / onepage / payment / methods-site2.phtml?
3) Is this the proper way to do this in 1.5.x ? 3)这是在1.5.x中执行此操作的正确方法吗?
setTemplate
. setTemplate
。 So, in your layout update file you should write <STORE_your_code>
<reference name="root">
<action method="setTemplate"><template>checkout/onepage/payment/methods-site2.phtml</template></action>
<block type="my_cool/block" name="my_cool_block">
...
</block>
</reference>
</STORE_your_code>
3. Yes, adding store specific handle to your theme layout update file is the right way for magento CE 1.5.x. 3.是的,为主题布局更新文件添加特定于商店的句柄是magento CE 1.5.x的正确方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.