RE: Greyed out "in cart" button if out of stock
eureka <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.tips |
|---|---|
| Message-ID | <3bfdb74d0c48fd549c71dea1abd41933@osCommerce-Forums> |
This message was sent from: Tips and Tricks
http://forums.oscommerce.com/viewtopic.php?p=183639#183639
----------------------------------------------------------------
Also do the same for ../includes/modules/product_listing.php so that the button is greyed out when the products are listed, ie., (about line 147)
[color=green]
case 'PRODUCT_LIST_BUY_NOW':
$lc_align = 'center';
if (tep_get_products_stock($listing_values['products_id'])> 0)
{
$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing_values['products_id'], 'NONSSL') . '">' . tep_image_submit('button_in_cart_small.gif',
TEXT_BUY . $listing_values['products_name'] . TEXT_NOW) . '</a> ';
}
else
{
$lc_text = tep_image_button('button_in_cart_small_faded.gif').' ';
}
break;[/color]
Regards,
Mark.