mirza_yasir4 Posted September 1, 2008 Share Posted September 1, 2008 (edited) Dear Everybody Scrolling What's New InfoBox by Yasir Imran Mirza This contribution scroll your latest added products in InfoBox. Installation: Overwrite the file whats_new.php into your catalog/includes/boxes/ directory. That's it! Feel free to contact me with any suggested enhancements or bugs. See it in action here: http://www.nasa4ppc.com Note: This code could be used to any info box in OsCommerce site, If you feel dificulty in using this for any other box, please contact me. Available for Download here http://addons.oscommerce.com/info/6199 Best Regards Yasir Imran Mirza yasirimran.wordpress.com Just modified the source of (Scrolling specials v1.0 by Justin Rains) Edited November 8, 2008 by Jan Zonjee Quote Thanks and Regards Yasir Imran Mirza My Contributions Link to comment Share on other sites More sharing options...
crag364 Posted September 13, 2008 Share Posted September 13, 2008 Hi, Nice contribution was just wondering if you could help me with a couple of things. The 1st one is can you have the scrolling box for each language as currently it shows the same image for all three languages. Also can you limit the amount of clips it shows? E.g the last 5 new clips or something. Thanks, Craig Quote Link to comment Share on other sites More sharing options...
Guest Posted September 23, 2008 Share Posted September 23, 2008 I like, thank you :D Quote Link to comment Share on other sites More sharing options...
Hotclutch Posted October 9, 2008 Share Posted October 9, 2008 Hi Nice contribution, thanks. I think a nice add-on would be to give the customer the option to stop and start scrolling. :) Quote Link to comment Share on other sites More sharing options...
binkycrafts Posted November 8, 2008 Share Posted November 8, 2008 (edited) Just what I was looking for. I had the scrolling specials in and that really has pushed sales, especially after I managed to make it choose a random selection of items from the db. I started trying to modify the code so I could have the same for the new items but was beyond me so had a quick look and here it is . .great although on my store I could not get it to centre the items so added a old school <div align= so if anyone can help with that one I would much rather get rid of the div if poss. I did try copying some of the code from the specials which centres no problem but without any luck. Anyway, thanks for the help , great contrib. see it . . www.binkycrafts.com/shop/ Binyks. Edited November 8, 2008 by Jan Zonjee Quote Tony Link to comment Share on other sites More sharing options...
koyurei Posted December 18, 2008 Share Posted December 18, 2008 how do i make it scroll horizontally ? instead of vertically ? please help thanks!!!! Quote Link to comment Share on other sites More sharing options...
koyurei Posted December 18, 2008 Share Posted December 18, 2008 can you post one that scrolls horizontally please ?? many thanks Quote Link to comment Share on other sites More sharing options...
koyurei Posted December 19, 2008 Share Posted December 19, 2008 example: http://islandtat.net/index.php the scrolling is very JERKY - please HELP !!! Dear EverybodyScrolling What's New InfoBox by Yasir Imran Mirza This contribution scroll your latest added products in InfoBox. Installation: Overwrite the file whats_new.php into your catalog/includes/boxes/ directory. That's it! Feel free to contact me with any suggested enhancements or bugs. See it in action here: http://www.nasa4ppc.com Note: This code could be used to any info box in OsCommerce site, If you feel dificulty in using this for any other box, please contact me. Available for Download here http://addons.oscommerce.com/info/6199 Best Regards Yasir Imran Mirza yasirimran.wordpress.com Just modified the source of (Scrolling specials v1.0 by Justin Rains) Quote Link to comment Share on other sites More sharing options...
mirza_yasir4 Posted February 2, 2009 Author Share Posted February 2, 2009 (edited) can you post one that scrolls horizontally please ?? many thanks Sorry for too late response, I don't know if you managed to complete it or not however to scroll it horizontally, you need a minor code changing around line no.36 in whats_new.php $info_box_contents[] = array('text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "70" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$bestsellers_list.'</MARQUEE>'); change the direction="up" to direction="right" or direction="left" like this $info_box_contents[] = array('text' => '<MARQUEE behavior= "scroll" align= "center" direction= "right" height="160" scrollamount= "2" scrolldelay= "70" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$bestsellers_list.'</MARQUEE>'); Edited February 2, 2009 by mirza_yasir4 Quote Thanks and Regards Yasir Imran Mirza My Contributions Link to comment Share on other sites More sharing options...
mirza_yasir4 Posted February 2, 2009 Author Share Posted February 2, 2009 example: http://islandtat.net/index.php the scrolling is very JERKY - please HELP !!! sorry for late response, this is simple html <marquee> tag you can google it and you will find a lot of options to control this movement, speed, direction, delay etc. Quote Thanks and Regards Yasir Imran Mirza My Contributions Link to comment Share on other sites More sharing options...
~Kira Posted June 3, 2009 Share Posted June 3, 2009 This does not work for me. I'm using v. RC2.2a and just keep getting errors. I only want 3 images on the What's New box, no scrolling, but I can't seem to write it out in php. Quote ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ Link to comment Share on other sites More sharing options...
2johnsons Posted June 13, 2009 Share Posted June 13, 2009 How can I use this for my best sellers box? Thank you Quote Link to comment Share on other sites More sharing options...
ivyfleur Posted June 15, 2009 Share Posted June 15, 2009 Hi mirza_yasir4, I installed it without any problems but the display is not centered. I also installed at the same time the addon for Scrolling Specials found here which is centered. Your's seems to be aligned left. How can I center the scrolling in the middle of the what's new box? Thanks. Quote Link to comment Share on other sites More sharing options...
mirza_yasir4 Posted June 20, 2009 Author Share Posted June 20, 2009 This does not work for me. I'm using v. RC2.2a and just keep getting errors. I only want 3 images on the What's New box, no scrolling, but I can't seem to write it out in php. Which browser you are testing ? it is working for me 100 % on 3 major browsers, IE, firefox and Chrome. check this www.nasa4ppc.com Quote Thanks and Regards Yasir Imran Mirza My Contributions Link to comment Share on other sites More sharing options...
mirza_yasir4 Posted June 20, 2009 Author Share Posted June 20, 2009 How can I use this for my best sellers box? Thank you You need to get involved in code, however I can't help you, I am busy Quote Thanks and Regards Yasir Imran Mirza My Contributions Link to comment Share on other sites More sharing options...
mirza_yasir4 Posted June 20, 2009 Author Share Posted June 20, 2009 Hi mirza_yasir4, I installed it without any problems but the display is not centered. I also installed at the same time the addon for Scrolling Specials found here which is centered. Your's seems to be aligned left. How can I center the scrolling in the middle of the what's new box? Thanks. Go into code and find where alignment is left, just replace it with center Quote Thanks and Regards Yasir Imran Mirza My Contributions Link to comment Share on other sites More sharing options...
ivyfleur Posted June 21, 2009 Share Posted June 21, 2009 Go into code and find where alignment is left, just replace it with center Thanks Yasir, Tried that but that didn't solve the problem. I also tried adding adding the following at line 36 which didn't work either:- $info_box_contents[] = array ('align' => 'center', 'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "70" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$bestsellers_list.'</MARQUEE>'); That marquee code does state align center but for some reason it's align left and not in the center of the box. Thanks. Quote Link to comment Share on other sites More sharing options...
mirza_yasir4 Posted June 23, 2009 Author Share Posted June 23, 2009 (edited) Thanks Yasir, Tried that but that didn't solve the problem. I also tried adding adding the following at line 36 which didn't work either:- $info_box_contents[] = array ('align' => 'center', 'text' => '<MARQUEE behavior= "scroll" align= "center" direction= "up" height="160" scrollamount= "2" scrolldelay= "70" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$bestsellers_list.'</MARQUEE>'); That marquee code does state align center but for some reason it's align left and not in the center of the box. Thanks. What is your shop's address ? url ? Try this Line 28 to 21 $bestsellers_list = '<table border="0" width="100%" cellspacing="0" cellpadding="1">'; while ($whats_new = tep_db_fetch_array($whats_new_query)) { $rows++; $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">' . '</td><td class="infoBoxContents">'. '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $whats_new['products_id']) . '">' .tep_image(DIR_WS_IMAGES . $whats_new['products_image'], $whats_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT).'<br>'. tep_row_number_format($rows). '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $whats_new['products_id']) . '">' . $whats_new['products_name'] . '</a></td></tr>'; replace the above with this $bestsellers_list = '<table border="0" width="100%" cellspacing="0" cellpadding="1" align="center">'; while ($whats_new = tep_db_fetch_array($whats_new_query)) { $rows++; $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top" align="center">' . '</td><td class="infoBoxContents" align="center">'. '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $whats_new['products_id']) . '">' .tep_image(DIR_WS_IMAGES . $whats_new['products_image'], $whats_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT).'<br>'. tep_row_number_format($rows). '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $whats_new['products_id']) . '">' . $whats_new['products_name'] . '</a></td></tr>'; Edited June 23, 2009 by mirza_yasir4 Quote Thanks and Regards Yasir Imran Mirza My Contributions Link to comment Share on other sites More sharing options...
KH221 Posted December 30, 2010 Share Posted December 30, 2010 Very nice contribution but I am having some problems. When I added this contribution to my site, all of my products got shifted and are now appearing underneath the "what's new" area. My products used to appear up by my header but are now all the way down at the bottom on the page. PLEASE HELP!! This is what my code looks like: <?php /* $Id: whats_new.php,v 1.21 2003/06/09 22:07:52 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $whats_new_query = tep_db_query("select distinct products.products_id,products_description.products_name, products.products_image, products.products_tax_class_id, products.products_price from " . TABLE_PRODUCTS . ",products_description where products.products_status = '1' AND language_id = $languages_id AND products_description.products_id = products.products_id order by products_date_added desc limit 10"); if (tep_db_num_rows($whats_new_query) >= 5) { ?> <!-- whats_new_scroll //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW)); $rows = 0; $bestsellers_list = '<table border="0" width="100%" cellspacing="0" cellpadding="1">'; while ($whats_new = tep_db_fetch_array($whats_new_query)) { $rows++; $bestsellers_list .= '<tr><td class="infoBoxContents" valign="top">'; $bestsellers_list .= '</td><td class="infoBoxContents" align="left">'; $bestsellers_list .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $whats_new['products_id']) . '">' . $whats_new['products_name'] . '</a><br>'; $bestsellers_list .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $whats_new['products_id']) . '">'; $bestsellers_list .= tep_image(DIR_WS_IMAGES . $whats_new['products_image'], $whats_new['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT); $bestsellers_list .= '<br><br>'; $bestsellers_list .= '</td></tr>'; } $bestsellers_list .= '</table>'; $info_box_contents = array(); $info_box_contents[] = array('text' => '<MARQUEE behavior= "scroll" align= "left" direction= "left" height="160" scrollamount= "2" scrolldelay= "70" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$bestsellers_list.'</MARQUEE>'); new infoBox($info_box_contents); ?> </td> </tr> <!-- whats_new_scroll_eof //--> <?php } ?> Quote Link to comment Share on other sites More sharing options...
bensuba Posted August 9, 2012 Share Posted August 9, 2012 (edited) It is not working for my website Strange ... www.tokokristik.com Edited August 9, 2012 by bensuba Quote My profile Link to comment Share on other sites More sharing options...
ducccky Posted January 21, 2014 Share Posted January 21, 2014 Is there a scrolling what's new for OsC 2.3.3.4? I tried the newest 1 and it didn't work, I got some error msg. Millie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.