Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

remove 'buy now' from certain products


seanpaul

Recommended Posts

Hi All,

 

I need the ability to display products in my store without letting my customers order them. i.e. I would like to remove the 'buy now' and 'in cart' buttons from certain products.

 

If anyone has done this or knows how I would greatly appreciate some pointers.

 

Thanks guys

Link to comment
Share on other sites

I have managed to grey out the 'in cart' button using the below code in product_info.php, unfortunatly the customer is still able to purchase the product.

Also It is only applied to the'in cart' button and not the 'buy now'

 

<?php

switch (tep_get_products_stock($products_id)) {

case 0:

echo '<em><font color="#999999">Cannot add to cart</font></em><br>';

echo tep_image_submit('button_in_cart_grey.gif', 'Cannot add to cart - out of stock');

break;

default:

echo '<input type="hidden" name="products_id" value=' . $product_info_values['products_id'] . '">';

echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

}

?>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...