|
|||
|
Hi there,
i have found some logic bugs in new_products.php module and whats new box : they are showing any products orderderd by date added, not only true new products : in new_products.php we have statment that will set range of product selection to only new products : Code:
if (MAX_DISPLAY_NEW_PRODUCTS_DAYS != '0') {
$date_new_products = date("Y.m.d", mktime(1, 1, 1, date(m), date(d) - MAX_DISPLAY_NEW_PRODUCTS_DAYS, date(Y)));
$days = " and p.products_date_added > '".$date_new_products."' ";
}
for an example : . . . ".$fsk_lock." ".$days." . . . same thing with box whats_new, but we must add this statment : Code:
if (MAX_DISPLAY_NEW_PRODUCTS_DAYS != '0') {
$date_new_products = date("Y.m.d", mktime(1, 1, 1, date(m), date(d) - MAX_DISPLAY_NEW_PRODUCTS_DAYS, date(Y)));
$days = " and p.products_date_added > '".$date_new_products."' ";
}
also this select query isn't optimized : Code:
$new_products_query = "SELECT * FROM You can replace it byt this one : Code:
$new_products_query = "SELECT p.products_id, pd.products_name, pd.products_short_description, p.products_price, p.products_tax_class_id, p.products_image, FROM |
![]() |
| Lesezeichen |
| Stichworte |
| bugs, newproductsphp, whatsnewphp |
| Themen-Optionen | |
| Ansicht | |
|
|