osCmax v2.5 User Manual
Results 1 to 6 of 6

semi-urgent plea for some clarification

This is a discussion on semi-urgent plea for some clarification within the osCommerce 2.2 Installation Help forums, part of the osCommerce 2.2 Forums category; I am trying to make sense of part of the osCDOX. Surely someone else has run into this before. I ...

      
  1. #1
    New Member
    Join Date
    Jan 2003
    Posts
    13
    Rep Power
    0


    Default semi-urgent plea for some clarification

    I am trying to make sense of part of the osCDOX. Surely someone else has run into this before. I have tried searching on "limit new product list" and all kinds of variations and had no success finding how to accomplish

    Limiting "New Products" listing to something less than the entire contents of the database.

    The "Installation / Modification Guide" from OSCDOX.com seems (to my denseness) to be missing some steps regarding "Products limited to a few on "new products" instead of listing wht whole database:

    I am pleading for some help with this... Perhaps even a pointer to where it has been dealt with before?

    I know I can be more dense than a door sometimes... I don't think this is one of those times...

    Thanks in advance for very needed assistance!

    jLee

  2. #2
    osCMax Developer

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


    Default

    It is not the clearest in the guide. Here is a rundown.

    On about line 56 of /catalog/products_new.php you will find this line:

    $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added DESC, pd.products_name";
    Add the bold text to that line.

    Next, in /catalog/includes/modules/new_products.php find the following lines, adding the bold text:

    $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()) 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()) order by p.products_date_added DESC limit " . MAX_DISPLAY_NEW_PRODUCTS);
    Thats it. Done!
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    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
    Jan 2003
    Posts
    13
    Rep Power
    0


    Default still not working correctly

    I carefully made the changes to the two files after restoring them to "factory fresh" condition.

    It continues to list the entire database in the "New Products" listing, as can be seen at url:
    http://httpsuites.com/oscommerce/pro...ew.php?page=95

    Products added on January 1 and products added on December 30 appear on the page. The page bottom indicates the rest of the database is waiting to be displayed also.

    quote
    Displaying 941 to 950 (of 1522 new products) Result Pages: [<< Prev] ... 91 92 93 94 95 ... [Next >>]
    /quote

    The OSCDOX "...Guide" mentions changing "3 files". Did that mean 3 lines in two files? Or are there changes to be made to another file to complete the modification?

    I hope the "Installation and Modification Guide" can be updated to clarify this procedure, once it has been made clear.

    Thanks again for all help with this.

    jLee

  4. #4
    osCMax Developer

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


    Default



    I missed a step... It was late I tell ya!

    You also need to add the following to /catalog/products_new.php:

    $products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and month(p.products_date_added) = month(now()) order by p.products_date_added DESC, pd.products_name";
    Just the stuff that is bold!
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    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

  5. #5
    New Member
    Join Date
    Jan 2003
    Posts
    13
    Rep Power
    0


    Default

    Thank you!!!!

    Roger on the late... I'm in central time.

    jLee

  6. #6
    New Member
    Join Date
    Jan 2003
    Posts
    13
    Rep Power
    0


    Default

    With that last piece of code, all is well with the world... well, a certain part of my worl anyway! Page 95 no longer has any product entered in December!

    You are a blessing! When I can, I will contribute! Still have much to do!

    Until the next time... God bless!

    jLee

Similar Threads

  1. urgent need help: Register_Globals
    By flyinrookie in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 03-04-2006, 11:33 PM
  2. page_parse_time.log error on site
    By Walter in forum osCommerce 2.2 Modification Help
    Replies: 4
    Last Post: 11-27-2005, 02:14 AM
  3. URGENT - PLEASE HELP - PWA Problem
    By ukgoods in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 07-29-2004, 10:31 AM
  4. New to here, need urgent helps, thanks a lot
    By crus in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 02-26-2003, 01:59 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
  •