Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hide 'add to cart' button when prices read 0.00


evbeej

Recommended Posts

Posted

Hello, 

 

I apologise now but I am new to OScommerce, I have looked through the threads but have not found one that fits what I am looking for. 

 

I am working on a site that has a range of products, each available in multiple colours and sizes. 

 

My question is: 

 

When the price appears as 0.00 for one of these options (ie. Red XL) is there a way of only hiding the 'add to cart' button when this specific option is selected, instead of the whole product which is what I have managed at the moment. 

 

The code i am using to achieve this is:

 

<?php 
 
if((($PACKPRICE <= 0.01) || ($UNITPRICE <= 0.01) || ($CASEPRICE <= 0.01)) && ($numSPECIAL <= 0.01) ) {
 
echo "<div style='float:right; margin-top:-15px;'><p>Product not available<br>Please contact Customer Service</p></div>";
 
} else { 
 
?>
 
<span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>
 
<?php 
}
?>
 
Any help would be appeciated, even just a point in the right direction. 
 
Thanks, 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...