Hide product price if 0 in magento 1.7 ?


I’m using magento 1.7.0.2 . In my store I want to show some product which don’t have price, and by default in magento they become 0.00 . There are some solution, for replacing: this

for the category page (/catalog/product/list.phtml)

<!--?php echo $this->getPriceHtml($_product, true) ?> in List.phtml


replace with

<!--?php if($_product->price==0): ?>


getPriceHtml($_product, true) ?>

 

for the Product page (/catalog/product/view.phtml)

<!--?php echo $this->getChildHtml('product_type_data') ?> in view.phtml


replace with

<!--?php if($_product->getFinalPrice()!=0): ?>
getChildHtml('product_type_data') ?>

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s