Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Out of Stock - But keep product in listing?


jhdesign

Recommended Posts

Try marking the items "in stock" but with 0 quantity. It will show them in the stock listings, but if the customer adds them to the cart it will pop up with whatever "out of stock" message you have entered and suggest they remove the item from their cart.

Link to comment
Share on other sites

Backup...Backup...Backup

Create an out of stock button name it: button_out_of_stock.gif and add it to

/includes/languages/english/images/buttons/

 

Open your includes/languages/english.php file and add:

 

define('IMAGE_BUTTON_OUT_OF_STOCK', 'Out of Stock');

 

In product_listing.php find this line:

 

CODE

<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

 

 

Replace with:

 

CODE

<td align="right" class="main"><?php If ($product_info['products_quantity']<>0){

echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);

}else{

echo tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . 'button_out_of_stock_cart.gif', IMAGE_BUTTON_OUT_OF_STOCK);

 

} ?></td>

 

 

Worked for me. Item must be active (set to green) with quantity of 0 to display 'out of stock'.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...