This is a discussion on New products listing within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; I think this has been asked before but I've not seen an answer to it yet, the new products list ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| I think this has been asked before but I've not seen an answer to it yet, the new products list shows all products regardless of when the product was added to the catalogue, I've changed the date added to 4 years ago but it still appears in the new products list (albeit at the end of the list). Does anyone have a fix for this as it seems to defeat the object of "new products" a little. Rob. |
| Sponsored Links | ||
| ||
|
#2
| ||||
| ||||
| This is answered in the guide: http://oscdox.com/modules.php?op=mod...ToCurrentMonth Note that instead of /catalog/products_new.php, you will need to edit /catalog/templates/aabox/content/products_new.tpl.php. Other than that, the edit will still do the job. This should have been fixed in MAX a long time ago, but it was overlooked. I have added this fix to the upcoming release of OSCmax. If you are not comfortable editing files, I have released a bugfix package here that you can get on the main forum page under Announcements.
__________________ Michael Sasek osCMax Developer
|
|
#3
| |||
| |||
| Thanks for the reply, the changes suggested work fine until you get to the same month a year later when the products appear as being new again! added the following code to the select statement: $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and month(p.products_date_added) = month(now()) and year(p.products_date_added) = year(now()) order by p.products_date_added DESC limit " . MAX_DISPLAY_NEW_PRODUCTS); $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $new_products_category_id . "' and p.products_status = '1' and month(p.products_date_added) = month(now()) and year(p.products_date_added) = year(now()) order by p.products_date_added DESC limit " . MAX_DISPLAY_NEW_PRODUCTS); That should do it, apart from the random "whats new" box needs changing aswell. Regards Rob. |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I want to show products in category listing | misbell | osCommerce 2.2 Modification Help | 1 | 01-27-2005 07:33 PM |
| Modyfying product listing and new products listing | pavlo | osCommerce 2.2 Modification Help | 0 | 11-22-2004 08:27 AM |
| Products Listing Layout | NickW | osCMax v1.7 General Mods Discussion | 2 | 06-24-2004 03:42 PM |
| drop down listing all products | Anonymous | osCMax v1.7 Discussion | 0 | 05-11-2004 09:28 AM |
| 2 products instead of 3 in product listing? | amilo | osCMax v1.7 Discussion | 3 | 01-25-2004 10:23 PM |