osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

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


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Installation Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 01-28-2003, 09:52 PM
New Member
 
Join Date: Jan 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jlee
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 01-28-2003, 10:40 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
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:

Quote:
$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:

Quote:
$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);
Quote:
$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 Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 01-29-2003, 07:48 AM
New Member
 
Join Date: Jan 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jlee
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 01-29-2003, 10:41 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default



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

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

Quote:
$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 Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 01-29-2003, 10:57 AM
New Member
 
Join Date: Jan 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jlee
Default

Thank you!!!!

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

jLee
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 01-29-2003, 11:07 AM
New Member
 
Join Date: Jan 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jlee
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
urgent need help: Register_Globals flyinrookie osCommerce 2.2 Modification Help 3 03-05-2006 12:33 AM
page_parse_time.log error on site Walter osCommerce 2.2 Modification Help 4 11-27-2005 03:14 AM
URGENT - PLEASE HELP - PWA Problem ukgoods osCommerce 2.2 Modification Help 1 07-29-2004 10:31 AM
New to here, need urgent helps, thanks a lot crus osCommerce 2.2 Modification Help 1 02-26-2003 02:59 PM


All times are GMT -8. The time now is 02:11 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax