2012-03-26 13 views
0

私は2つのモジュールを持っています。両方のモジュールはバンドルレンダリング項目をオーバーライドする必要があり、どちらもうまくいきます。しかし、両方のモジュールがアクティブな間にレンダリング項目のいずれかが別のものを表示していません。しかし、両方の項目を表示します。ショーは私がブロックを上書きしないで追加することができます。例えばMagentoブロックを追加する方法

、ブロックの上

<sales_email_order_items> 
    <reference name="items"> 
     <action method="addItemRender"> 
      <type>bundle</type> 
      <block>booking/sales_order_items_renderer</block> 
      <template>email/order/items/invoice/default.phtml</template> 
     </action> 
     <action method="addItemRender"> 
      <type>bundle</type> 
      <block>module1/bundle_sales_order_items_renderer</block> 
      <template>module1/bundle/email/order/items/order/default.phtml</template> 
     </action> 
     <action method="addItemRender"> 
      <type>bundle</type> 
      <block>module2/bundle_sales_order_items_renderer</block> 
      <template>module2/bundle/email/order/items/order/default.phtml</template> 
     </action> 
    </reference> 
</sales_email_order_items> 

は、販売注文、メールでのModule1とモジュール2から余分な項目が追加されます。 しかし、module2はmodule1をオーバーライドします。私は両方のオプションを表示する必要があります!

答えて

0

の提案の一つは、サブクラス

addItemRender 

機能に変更したり、overrdieことであろう。

ブロックを置き換えずに追加します。

私が正しくUを理解している場合:私として

need to show both options 

を、彼らはお互いを邪魔しないように、おそらく、私は、モジュールを再設計します。いくつかのオブザーバーイベントパターンかもしれません。

関連する問題