osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Change # of new products on main page?

This is a discussion on Change # of new products on main page? within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; I have studied the admin panel and I haven't been able to change the number of 'new products for ...


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 05-06-2008, 09:15 PM
Member
 
Join Date: May 2008
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Rep Power: 0
lwilliams114 is on a distinguished road
Default Change # of new products on main page?

I have studied the admin panel and I haven't been able to change the number of 'new products for May' displayed on main page. Right now it is only showing 3 products but I would like to show 9 products. Please help me find the right place to change that one.
Thanks in advance.
Lynn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 05-06-2008, 09:58 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,170
Thanks: 66
Thanked 290 Times in 276 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: Change # of new products on main page?

Admin panel:

Configuration >> Maximum Values >> New Products Module
__________________
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
  #3  
Old 05-07-2008, 06:42 AM
Member
 
Join Date: May 2008
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Rep Power: 0
lwilliams114 is on a distinguished road
Default Re: Change # of new products on main page?

I appreciate that. I don't why I couldn't see it. Maybe I was looking too hard.
Thanks
Lynn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 05-07-2008, 06:57 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,170
Thanks: 66
Thanked 290 Times in 276 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: Change # of new products on main page?

There are a lot of options, easy to miss for a beginner
__________________
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
  #5  
Old 05-07-2008, 07:23 AM
Member
 
Join Date: May 2008
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Rep Power: 0
lwilliams114 is on a distinguished road
Default Re: Change # of new products on main page?

It worked great! Just an oversight. Those front page 'new products' images are controlled by what I add to the inventory thats new. Is there a way that I can remove that 'new products for May' display words and just have the photos show. How do I pick the images to show instead of the images being dependant on what I add as a new item?
Thanks again for your kindness.
Lynn
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 05-07-2008, 11:25 AM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 405
Thanks: 3
Thanked 63 Times in 61 Posts
Rep Power: 6
met00 is a jewel in the roughmet00 is a jewel in the roughmet00 is a jewel in the roughmet00 is a jewel in the rough
Default Re: Change # of new products on main page?

in /includes/modules find new_products.php

the query that generates the new products looks like:

$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()) and products_price > '0' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

Now this is what you will want to modify if you want to enhance the quality of what you get. The first thing you may notice is that it gets ONLY for the current month. This can be a problem with a store that is over a year old and you didn't add products this month as it will pick up products added a year ago on this month and display them as new... (it's not a feature, it's a defect). Then you will note that it will get the last N products ordered by the date added (the N value is set in your admin panel). So if you were to say add 5 products in May of 2006, it would show those 5 (even if N was 12). But let's say you added 5 in May 2007 and 5 more in May 2008... Now it will show 12, but 5 will be New, 5 will be a year old and 2 will be 2 years old. If you were to upload say 20 in May, only the last 12 uploaded will be shown.

The best way to handle this is to rewrite the query so that it picks up all products added in the last 120 days. Then randomize the array of selected products and loop through the array writing the N items to a new array as the new products to be displayed.

Now you have a version of new products that will actually list the new products.

As for display issues...

got to templates/yourtemplate/content and edit products_new.tpl.php
(if you don't have it in your content area then copy it from fallback/content to yourtemplate/content)

Yes, you will have to replace the query here (don't ask me why it doesn't call the new products module, but it doesn't).

Next to get rid of the new products text line that annoys you, generally that would be found in either /includes/languages/english.php or in the proper files in /includes/languages/english directory. [I would tell you exactly where, but I don't have a stock store to look at right now and I stripped it already]

And for the record, I have ALWAYS found new products to be useless. Just for one of the reasons you have stated, you have no control over what gets shown. I highly recommend that "featured products" be used instead as you have total control over what is in there. So, you can add a new product to the featured list if you want to have it show up on pages, and you can modify featured to act like new products when a person goes to a category (or better yet, create a mod called featured_category and have it act like the "active" button on the admin side so you can quickly add an item to be a featured item for that category).
__________________
so endith the lesson
<think>sometimes I just sit's and thinks</think>
"Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 05-07-2008, 07:45 PM
Member
 
Join Date: May 2008
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Rep Power: 0
lwilliams114 is on a distinguished road
Default Re: Change # of new products on main page?

I knew that there had to be some kind of defect there as it just didn't work like it should. Using 'featured products' would be a great idea. How hard would that be to set up so 'featured products' shows instead of 'new products' on the front page?
Thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 05-08-2008, 12:15 AM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 405
Thanks: 3
Thanked 63 Times in 61 Posts
Rep Power: 6
met00 is a jewel in the roughmet00 is a jewel in the roughmet00 is a jewel in the roughmet00 is a jewel in the rough
Default Re: Change # of new products on main page?

I would start with seeing if this works...

Code:
<tr>
            <td><br><?php include(DIR_WS_MODULES . FILENAME_FEATURED); ?></td>
          </tr>
and if it doesn't "display" the way you want copy
includes/modules/featured.php to includes/modules/featured_products.php
add define('FILENAME_FEATURED_PRODUCTS', 'featured_products.php'); to /includes/filenames.php
change
<?php include(DIR_WS_MODULES . FILENAME_FEATURED); ?>
to
<?php include(DIR_WS_MODULES . FILENAME_FEATURED_PRODUCTS); ?>
in templates/yourtemplate/content/products_new.tpl.php

edit /includes/modules/featured_products.php to display the way you want (in accordance to your templates)

and now you have featured products on the front page.

[side note, if you find any of the posts useful, may I suggest that you use the thank you button on the post to thank the author. In addition, you can click on the little scale and "add to the reputation" of the person who provides help.]
__________________
so endith the lesson
<think>sometimes I just sit's and thinks</think>
"Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to met00 For This Useful Post:
lwilliams114 (05-08-2008)
  #9  
Old 05-08-2008, 07:30 AM
Member
 
Join Date: May 2008
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Rep Power: 0
lwilliams114 is on a distinguished road
Default Re: Change # of new products on main page?

Thanks very much for walking me through these changes. You have been very helpful. I will try this solution tonight.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 05-08-2008, 07:42 AM
Member
 
Join Date: May 2008
Posts: 39
Thanks: 9
Thanked 0 Times in 0 Posts
Rep Power: 0
lwilliams114 is on a distinguished road
Default Re: Change # of new products on main page?

MET00,
In the first part of your helpful reply you gave me some code to try. Where and what php file should I add this to.
Also I am sure I am missing something but these two php files are not there:
'includes/modules/featured.php to includes/modules/featured_products.php'
that is the 'featured.php' and the 'featured_products.php'.
Please tell me what I am missing as I know I am missing something. I even did a search on the OSCMAX folder and couldn't find the two filenames.
Thanks again for your much needed help.
Lynn
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
How to list all products on main page marcygiff osCMax v2 Customization/Mods 2 12-12-2006 01:01 PM
how to change color/size of links within main page joanstead osCMax v2 Customization/Mods 3 02-09-2006 02:19 PM
keep newest products up on main page under New Products for. Redeye_Joe osCMax v2 Customization/Mods 2 12-04-2005 11:37 AM
Can't change title tag for main page emikey24 osCommerce 2.2 Modification Help 0 04-09-2005 05:03 PM
new products on main page winkscustoms osCMax v1.7 Discussion 0 03-03-2005 10:22 AM


All times are GMT -8. The time now is 01:37 PM.


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