Reputation: 31
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
<?php echo $this->getPriceHtml($_product, true) ?>
with
<?php if($_product->price==0): ?>
<?php echo 'Free'; /?>
<?php else: ?>
<?php echo $this->getPriceHtml($_product, true) ?>
<?php endif; ?>
And yes this is solve problem only if I replace in list.phtml (list and grid), but when I open product page with all details, there is still 0.00.
Thanks in advance.
Upvotes: 1
Views: 5513
Reputation: 563
You can try this -
http://www.magikcommerce.com/magento-hide-price-extension
Hope this will help you.
Upvotes: 0
Reputation: 31
I solved the problem, just need to replace this code, in path app\design\frontend\default\YOURTHEME\template\catalog\product:
<?php echo $this->getTierPriceHtml() ?>
<?php echo $this->getChildHtml('alert_urls') ?>
<?php echo $this->getChildHtml('product_type_data') ?>
<?php echo $this->getChildHtml('extrahint') ?>
with this:
<?php if($_product->price==0): ?>
<?php echo 'Free'; ?>
<?php else: ?>
<?php echo $this->getPriceHtml($_product, true) ?>
<?php endif; ?>
Upvotes: 2