ivylane Posted March 14, 2006 Posted March 14, 2006 Can anyone help me change the "New Products for March" area say something else,.. like "Featured Products"? Also, can I control what products are in this area? How are the products in this area generated? Any help would be great!!
rabbitseffort Posted March 14, 2006 Posted March 14, 2006 change the name in your language file, like in english.php "I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings." ---Margaret Mead--- "The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer. --Ken Kesey"
ivylane Posted March 17, 2006 Author Posted March 17, 2006 change the name in your language file, like in english.php thank you so much!! Do you know how the items in that area are generated? Can I control what items show up in that area?
ddp Posted March 17, 2006 Posted March 17, 2006 thank you so much!! Do you know how the items in that area are generated? Can I control what items show up in that area? I think what you want to install is something called "featured products" contribution you can access it at: http://www.oscommerce.com/community/contri...atured+products Backup before making changes. Backup before making changes! Backup before making changes!! You did do a backup? eh?
MrMcauber Posted March 19, 2006 Posted March 19, 2006 I've just been working on this "New Products For..." box as unless you constantly upload new products it just looks stale. What I did was this, take the new_products.php file from /catalog/includes/modules - if you look inside you should see two SQL queries - they both start like "$new_products_query = tep_db_query(" at the end of these queries between the : order by and the : limit " . MAX_DISPLAY_NEW_PRODUCTS); delete whats there (p.products_date_added desc) and replace it with RAND() this way I get a display of random products, so its always changing and looks fresher, people get to see things they may not have done without digging through the store. You dont actually "control" what they see, but at least it changes. hope that makes sense... I think what you want to install is something called "featured products" contribution you can access it at: http://www.oscommerce.com/community/contri...atured+products
rabbitseffort Posted March 19, 2006 Posted March 19, 2006 Thanks Gareth, this is a great feature you added--It makes sense for small shop owners that do not update often! :thumbsup: "I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings." ---Margaret Mead--- "The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer. --Ken Kesey"
rabbitseffort Posted March 19, 2006 Posted March 19, 2006 change the name in your language file, like in english.php make that english/index.php--sorry I do not always think all the way thru these things :huh: "I must admit that I personally measure success in terms of the contributions an individual makes to her or his fellow human beings." ---Margaret Mead--- "The answer is never the answer. What's really interesting is the mystery. If you seek the mystery instead of the answer, you'll always be seeking. I've never seen anybody really find the answer -- they think they have, so they stop thinking. But the job is to seek mystery, evoke mystery, plant a garden in which strange plants grow and mysteries bloom. The need for mystery is greater than the need for an answer. --Ken Kesey"
jennymac Posted March 19, 2006 Posted March 19, 2006 Gareth, would you mind posting the entire code? I'm a bit confused (as usual)! Thanks.
MrMcauber Posted March 20, 2006 Posted March 20, 2006 No problem, my new_products.php file is as shown below.... Gareth, would you mind posting the entire code? I'm a bit confused (as usual)! Thanks. <?php /* $Id: new_products.php,v 1.34 2003/06/09 22:49:58 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- new_products //--> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); new contentBoxHeading($info_box_contents); if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $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' order by RAND() limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { $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 = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by RAND() limit " . MAX_DISPLAY_NEW_PRODUCTS); } $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $new_products['products_name'] = tep_get_products_name($new_products['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a><br>' . $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id']))); $col ++; if ($col > 2) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> <!-- new_products_eof //-->
jennymac Posted March 20, 2006 Posted March 20, 2006 Thank you so much - I'm looking forward to trying it. It does get very static when you don't add products everyday or so. And, it's nice to let your customers see what else you offer. Of course, the site owner is going to see it more than others - lol. Take care!
genuckols Posted March 20, 2006 Posted March 20, 2006 Thank you very much MrMcauber for showing how to randomize the selection of items to show. I have also been looking for a way to change the number of products shown. Where do I find this? Thanks for your help.
genuckols Posted March 20, 2006 Posted March 20, 2006 I have also been looking for a way to change the number of products shown. Where do I find this? Well don't I feel silly. I have been looking all over the place and found it right there in the admin configuration area. I learn something about this software every minute.
MrMcauber Posted March 20, 2006 Posted March 20, 2006 No problem Jenny, glad I could help for a change, its usually me asking for help! :-" Im pretty new to OsCommerce and doing a lot of digging around to sort my own store and it just seems people are asking the same questions on here that I was looking for the answers to when I started digging; so its good to try and give something back! Worked like a charm - thanks!
MrMcauber Posted March 20, 2006 Posted March 20, 2006 :D Yup, been there, done that too! Its a great bit of software but it can be difficult finding the things you need to change, sometimes its easy, somtimes hard but the tendancy is to assume its hard and look in the wrong place! Well don't I feel silly. I have been looking all over the place and found it right there in the admin configuration area. I learn something about this software every minute.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.