osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

products_new.tpl.php

This is a discussion on products_new.tpl.php within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; I have a question about the file products_new.tpl.php. I see that oscmax does new product listings by active ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 02-07-2007, 10:12 AM
New Member
 
Join Date: Apr 2005
Posts: 29
Thanks: 1
Thanked 5 Times in 5 Posts
Rep Power: 0
dead7
Default products_new.tpl.php

I have a question about the file products_new.tpl.php.

I see that oscmax does new product listings by active month in the index_nested.tpl.php -- How can I change that so it just shows all new products in that particular category? I don't want it to be month specific.

Rarely do we add products monthly, but we do like this feature so it fills in the nested index.php pages a little better.

Just want to remove the month specifics on it and just have it show new products for that category is all.. no date restrictions on when a product had to be added to show up.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to dead7 For This Useful Post:
zuqaili (03-30-2007)
  #2  
Old 02-07-2007, 08:58 PM
osCMax Testing Team
 
Join Date: Nov 2002
Location: Orlando
Posts: 200
Thanks: 10
Thanked 22 Times in 14 Posts
Rep Power: 7
JohnW will become famous soon enoughJohnW will become famous soon enough
Default Re: products_new.tpl.php

I agree using the month to base the new products is a bad idea. It's really a problem when you haven't added products for the current month so it pulls from lasts year's month. Freaked me out first time I saw that.

Anyway, look around line 16 for
Code:
  $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, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and month(p.products_date_added) = month(now()) order by p.products_date_added DESC, pd.products_name";
and change it to this
Code:
  $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, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and (p.products_date_added) order by p.products_date_added DESC, pd.products_name";
__________________
John
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to JohnW For This Useful Post:
jmdesign (02-11-2007)
  #3  
Old 02-08-2007, 08:17 AM
New Member
 
Join Date: Apr 2005
Posts: 29
Thanks: 1
Thanked 5 Times in 5 Posts
Rep Power: 0
dead7
Default Re: products_new.tpl.php

Oddly enough I did try messing with that only a bit differently than you listed above.. It doesn't seem to work any which way I edit it though Any other ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 02-08-2007, 09:04 AM
osCMax Testing Team
 
Join Date: Nov 2002
Location: Orlando
Posts: 200
Thanks: 10
Thanked 22 Times in 14 Posts
Rep Power: 7
JohnW will become famous soon enoughJohnW will become famous soon enough
Default Re: products_new.tpl.php

Oops, there is another file I forgot about. In includes/modules/new_products.php look around line 26
Code:
    $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' and month(p.products_date_added) = month(now()) order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
Change to
Code:
    $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
And around line 29
Code:
    $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p, " . 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 = '" . (int)$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);
Change to
Code:
    $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, p.products_price as products_price from " . TABLE_PRODUCTS . " p, " . 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 = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
__________________
John
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 9 Users Say Thank You to JohnW For This Useful Post:
altenter (06-08-2007), basnyd (05-22-2007), bkpie (12-22-2007), dead7 (02-08-2007), jmdesign (02-11-2007), MindTwist (10-09-2007), neil (03-18-2007), typhus (11-08-2007), zuqaili (03-30-2007)
  #5  
Old 02-08-2007, 11:12 AM
New Member
 
Join Date: Apr 2005
Posts: 29
Thanks: 1
Thanked 5 Times in 5 Posts
Rep Power: 0
dead7
Default Re: products_new.tpl.php

Perfect,

Michael.. worth a sticky here!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 02-08-2007, 02:18 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,247
Thanks: 66
Thanked 294 Times in 280 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 Re: products_new.tpl.php

Make sure to click the Thanks! button on one of John's posts dead7.
__________________
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 02-08-2007, 03:23 PM
New Member
 
Join Date: Apr 2005
Posts: 29
Thanks: 1
Thanked 5 Times in 5 Posts
Rep Power: 0
dead7
Default Re: products_new.tpl.php

Quote:
Originally Posted by michael_s View Post
Make sure to click the Thanks! button on one of John's posts dead7.
Fair enough. but man, I can't stand that vbulletin hack
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 02-08-2007, 07:15 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,247
Thanks: 66
Thanked 294 Times in 280 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 Re: products_new.tpl.php

Why do you hate it? I love it. Keeps the forum clear of all those thousands of Thank you posts. I delete about a dozen posts a day that simply say "thanks" or some version of thanks.

I hate em... It really clutters the forums when there are ten thank you posts for every legitimate post. Thank you posts are as bad as spam for a forum administrator...

The Thank you hack is great as it accomplishes 2 things that we need here. It gets rid of the need to post a thank you post and saves you the time of having to reply if all you want to do is say thanks. Just click the thanks button. And it awards reputation to whomever you thank, allowing them to build credibility and rank here at the community.
__________________
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 02-16-2007, 12:07 AM
Lurker
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ZacFields is on a distinguished road
Default Re: products_new.tpl.php

I'm not sure if this is related or not, but does anyone know how I can make it so that more than just 3 of the "new products" shows up on the index page?

I'd like to change it to more like 6 or 9

Zac
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 02-16-2007, 07:22 AM
osCMax Testing Team
 
Join Date: Nov 2002
Location: Orlando
Posts: 200
Thanks: 10
Thanked 22 Times in 14 Posts
Rep Power: 7
JohnW will become famous soon enoughJohnW will become famous soon enough
Default Re: products_new.tpl.php

Yes, that is done in the Admin Panel under configuration. Actually, it's really worth your time to go through the Admin panel line by line as it controls quite a bit.
__________________
John
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



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
limiting products properly in products_new ganz_friedrich osCommerce 2.2 Modification Help 0 06-10-2005 04:48 AM


All times are GMT -8. The time now is 09:39 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax