Magento – disable add to cart for product with price 0

addtocartcart

I was able to print a div when the price is 0 in this way

<?php if ($this->getProduct()->getFinalPrice()==0) : ?>

CALL NOW 123336541

<?php return; ?>

how do I disable add to cart when the price is 0?

Best Answer

please try

<?php if($_product->getPrice() != '0.00') {?> <button type="button" title="<?php echo $this->quoteEscape($this->__('Add to Cart')) ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"> <span><span><?php echo $this->__('Add to Cart') ?></span></span></button> <?php } ?>

Related Topic