Rachael w. Posted February 25, 2007 Share Posted February 25, 2007 Here's the very simple install of this contrib, however, for some reason on my new server it doesnt work. It displays every item with the sold out button. In catalog/products_info.php - Find: <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: <!--Begin Sold Out--> <?php $products_sold_out = ''; $stock_left = tep_get_products_stock($products_id) - $products_quantity; $products_sold_out = stock_left; if ($stock_left > 0) { $submit_button = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } else { $submit_button = tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/button_sold_out.gif', 'Sold Out', IMAGE_BUTTON_SOLD_OUT); } ?> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . $submit_button; ?></td> <!--End Sold Out--> The only thing I've had to change so far to get osc to work on the new server is the Register Globals contrib. I've gone back to the original button code for now, but I'd really like this contrib to work. Does anyone have any suggestions as to why it wasnt working? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.