PDA

View Full Version : Get 1 Free



michael_s
03-02-2008, 02:14 PM
Corrected Package for version 1.4.

There was a typo in the includes/functions/get_1_free.php file

Change

// Auto expire products on get_1_free
function tep_expire_get_1_free() {
$get_1_free_query = tep_db_query("select get_1_free_id from " . TABLE_GET_1_FREE . " where status = '1' and now() >= get_1_free_expires_date and get_1_free_expires_date > 0");
if (tep_db_num_rows($specials)) {
while ($get_1_free = tep_db_fetch_array($get_1_free_query)) {
tep_set_get_1_free_status($get_1_free['get_1_free_id'], '0');
}
}
}


to

// Auto expire products on get_1_free
function tep_expire_get_1_free() {
$get_1_free_query = tep_db_query("select get_1_free_id from " . TABLE_GET_1_FREE . " where status = '1' and now() >= get_1_free_expires_date and get_1_free_expires_date > 0");
if (tep_db_num_rows($get_1_free_query)) {
while ($get_1_free = tep_db_fetch_array($get_1_free_query)) {
tep_set_get_1_free_status($get_1_free['get_1_free_id'], '0');
}
}
}


More... (http://addons.oscommerce.com/info/4990)