且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我如何向magento添加新的价格模板

更新时间:2022-02-24 18:57:49

在互联网上搜索了很长时间之后,我发现了一种不错的方法:

after a long search time on the internet i found a nice way:

在catalog.xml文件中,我刚刚添加了动作:

in the file catalog.xml i just added the actions:

<action method="addPriceBlockType"><type>simple</type><block>catalog/product_price</block><template>catalog/product/new_price.phtml</template></action>
<action method="addPriceBlockType"><type>grouped</type><block>catalog/product_price</block><template>catalog/product/new_price.phtml</template></action>
<action method="addPriceBlockType"><type>configurable</type><block>catalog/product_price</block><template>catalog/product/new_price.phtml</template></action>

到区块:

<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">