Change price file using with product in Magento

magento

If you want using a other file price.phtml to update price for products. But don’t influence to other products.

You can using price other file for products type assign as below code:

<!--replace price.phtml to price_detail.phtml -->
<catalog_product_view translate="label">
    <reference name="catalog_product_price_template">
        <action method="addPriceBlockType"><type>simple</type><block>catalog/product_price</block><template>catalog/product/price.phtml</template></action>
        <action method="addPriceBlockType"><type>grouped</type><block>catalog/product_price</block><template>catalog/product/price_detail.phtml</template></action>
        <action method="addPriceBlockType"><type>configurable</type><block>catalog/product_price</block><template>catalog/product/price_detail.phtml</template></action>
        <action method="addPriceBlockType"><type>virtual</type><block>catalog/product_price</block><template>catalog/product/price_detail.phtml</template></action>
        <action method="addPriceBlockType"><type>bundled</type><block>catalog/product_price</block><template>catalog/product/price_detail.phtml</template></action>
    </reference>
</catalog_product_view>

In this code: I use handle “catalog_product_view”.

Products type: grouped, configurable, vitual, bundled will using price to price_detail.phtml file

Separately product simple will using price.phtml file old.

 

change type price

Price type was change view type