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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
|
#2
| ||||
| ||||
| 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. |
|
#3
| |||
| |||
| I appreciate that. I don't why I couldn't see it. Maybe I was looking too hard. Thanks Lynn |
|
#4
| ||||
| ||||
| 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. |
|
#5
| |||
| |||
| 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 |
|
#6
| |||
| |||
| 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 |
|
#7
| |||
| |||
| 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. |
|
#8
| |||
| |||
| I would start with seeing if this works... Code: <tr>
<td><br><?php include(DIR_WS_MODULES . FILENAME_FEATURED); ?></td>
</tr> 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 |
| The Following User Says Thank You to met00 For This Useful Post: | ||
lwilliams114 (05-08-2008) | ||
|
#9
| |||
| |||
| Thanks very much for walking me through these changes. You have been very helpful. I will try this solution tonight. |
|
#10
| |||
| |||
| 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 |
| Thread Tools | |
| |
| ||||
| 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 |