Results 1 to 3 of 3

New products listing

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 ...

      
  1. #1
    New Member
    Join Date
    Feb 2004
    Posts
    20
    Rep Power
    0


    Default New products listing

    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.

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,477
    Rep Power
    567


    Default

    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


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    New Member
    Join Date
    Feb 2004
    Posts
    20
    Rep Power
    0


    Default

    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.

Similar Threads

  1. I want to show products in category listing
    By misbell in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 01-27-2005, 07:33 PM
  2. Modyfying product listing and new products listing
    By pavlo in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 11-22-2004, 08:27 AM
  3. Products Listing Layout
    By NickW in forum osCMax v1.7 General Mods Discussion
    Replies: 2
    Last Post: 06-24-2004, 03:42 PM
  4. drop down listing all products
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 05-11-2004, 09:28 AM
  5. 2 products instead of 3 in product listing?
    By amilo in forum osCmax v1.7 Discussion
    Replies: 3
    Last Post: 01-25-2004, 10:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •