Hi
I'm trying to remove the buy button when stock is less then 0.
In product_listing_col I have tried changing this code:
case 'PRODUCT_LIST_BUY_NOW':
// this button will be in a separate table row for better aligning
$buy_now_button_array[] = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','sort','products_id')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW, 'style="padding-top: 5px;"') . '</a> ';
$lc_text = ''; // otherwise the previous $lc_text will be outputted again
break;
to:
case 'PRODUCT_LIST_BUY_NOW':
// this button will be in a separate table row for better aligning
if ($listing[$x]['products_quantity'] > 0)
{
$buy_now_button_array[] = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','sort','products_id')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW, 'style="padding-top: 5px;"') . '</a> ';
$lc_text = ''; // otherwise the previous $lc_text will be outputted again
}
else
{
$lc_text = ' ' ;
}
break;
But it is not quit working, any idea to where the problem is?
/Jesper