You could customize the button function for the function zen_get_buy_now_button located in:
/includes/functions/functions_general.php
There is a select done on line 1129:
PHP Code:
$button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
Change that to:
PHP Code:
$button_check = $db->Execute("select product_is_call, products_quantity, products_date_available from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
// upcoming date not available to purchase
$upcoming_date_check = time();
$upcoming_date_check = date('Ymd', $upcoming_date_check);
$zc_current_date = (int)str_replace('-','',substr($button_check->fields['products_date_available'],0,10));
Just before the default case statement add:
PHP Code:
case ($zc_current_date > 0 && $zc_current_date >= $upcoming_date_check):
$return_button = 'AVAILABLE: ' . zen_date_short($button_check->fields['products_date_available']);
break;
NOTE: there is no override for this file so save both the original and your changes ...
Bookmarks