evbeej Posted August 25, 2015 Share Posted August 25, 2015 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, Link to comment Share on other sites More sharing options...
Jack_mcs Posted August 25, 2015 Share Posted August 25, 2015 I suggest you install QTPro. It doesn't hide the add to cart button but prevents it from being used if the quantity of the selected attribute is 0. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
evbeej Posted August 26, 2015 Author Share Posted August 26, 2015 Thanks Jack, I will look into it and give it a go! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.