In the functions_general.php ... in the function zen_get_buy_now_button ...
The sold out is tested after the approval tests ...
The approval returns you to where it was called from and never checks the sold out status ... so, you never see it ...
You could add an extra button check:
Code:
// bof: extra check sold out
$sold_out_button = '';
$button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
if ($button_check->fields['products_quantity'] <= 0 and SHOW_PRODUCTS_SOLD_OUT_IMAGE == '1') {
if ($_GET['main_page'] == zen_get_info_page($product_id)) {
$sold_out_button = '<br />' . zen_image_button(BUTTON_IMAGE_SOLD_OUT, BUTTON_SOLD_OUT_ALT);
} else {
$sold_out_button = '<br />' . zen_image_button(BUTTON_IMAGE_SOLD_OUT_SMALL, BUTTON_SOLD_OUT_SMALL_ALT);
}
}
// eof: extra check sold out
Above the code:
Code:
switch (true) {
case (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == ''):
Then, add the variable created:
$sold_out_button
to the return lines of the cases as needed ...