Jump to content



Latest News: (loading..)

- - - - -

Scrolling What's New Box


  • Please log in to reply
19 replies to this topic

#1   mirza_yasir4

mirza_yasir4
  • Members
  • 105 posts
  • Real Name:Yasir Imran Mirza
  • Gender:Male
  • Location:Jeddah, Saudi Arabia

Posted 01 September 2008 - 10:19 PM

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 by Jan Zonjee, 08 November 2008 - 06:43 PM.

Thanks and Regards
Yasir Imran Mirza
My Contributions

#2   crag364

crag364
  • Members
  • 28 posts
  • Real Name:Craig

Posted 13 September 2008 - 12:58 PM

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

#3   Design Recollections

Design Recollections
  • Members
  • 163 posts
  • Real Name:Heather
  • Gender:Female
  • Location:Scotland

Posted 23 September 2008 - 08:39 PM

I like, thank you :D
Heather...

[img]http://img.photobucket.com/albums/v22/ElleFan/smilies/icon_baby_crawl-1.gif[/img]Crawling my way through pages of code with my fingers crossed and one eye on here. Grateful to many at the osCommerce Community. Thank YOU

Coding successes: GV & Coupons, UltraPics, FCK Editor, Product Listings Enhancement, Short Descriptions, Define Main Page, Text Box, Attribute Sets Plus, . PayPal WPP. UL Catagories. Dynamenu. Featured Products. Mailist Report 1.2. Easy Meta Tags (Now even I could have screwed that up) Sold Out but Displayed 0.3. Club osc Specials on Front Page. Order Editor.  HTML Emails V2
Working on: SEO



Proud member of the Code Breakers Club

#4   Hotclutch

Hotclutch
  • Members
  • 1,243 posts
  • Real Name:Ashley
  • Gender:Male
  • Location:Cape Town, SA

Posted 09 October 2008 - 12:47 PM

Hi

Nice contribution, thanks.

I think a nice add-on would be to give the customer the option to stop and start scrolling.
:)

#5   binkycrafts

binkycrafts
  • Members
  • 39 posts
  • Real Name:Tony Charlton

Posted 08 November 2008 - 04:48 PM

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 by Jan Zonjee, 08 November 2008 - 06:42 PM.

Tony

#6   koyurei

koyurei
  • Members
  • 10 posts
  • Real Name:aron yu

Posted 18 December 2008 - 08:04 PM

how do i make it scroll horizontally ? instead of vertically ? please help

thanks!!!!

#7   koyurei

koyurei
  • Members
  • 10 posts
  • Real Name:aron yu

Posted 18 December 2008 - 08:25 PM

can you post one that scrolls horizontally please ?? many thanks

#8   koyurei

koyurei
  • Members
  • 10 posts
  • Real Name:aron yu

Posted 19 December 2008 - 01:41 AM

example: http://islandtat.net/index.php

the scrolling is very JERKY - please HELP !!!




View Postmirza_yasir4, on Sep 1 2008, 02:19 PM, said:

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)


#9   mirza_yasir4

mirza_yasir4
  • Members
  • 105 posts
  • Real Name:Yasir Imran Mirza
  • Gender:Male
  • Location:Jeddah, Saudi Arabia

Posted 02 February 2009 - 07:24 AM

View Postkoyurei, on Dec 18 2008, 09:25 PM, said:

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 by mirza_yasir4, 02 February 2009 - 07:24 AM.

Thanks and Regards
Yasir Imran Mirza
My Contributions

#10   mirza_yasir4

mirza_yasir4
  • Members
  • 105 posts
  • Real Name:Yasir Imran Mirza
  • Gender:Male
  • Location:Jeddah, Saudi Arabia

Posted 02 February 2009 - 07:26 AM

View Postkoyurei, on Dec 19 2008, 02:41 AM, said:

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.
Thanks and Regards
Yasir Imran Mirza
My Contributions

#11   ~Kira

~Kira
  • Members
  • 181 posts
  • Real Name:Starlight Design
  • Gender:Female
  • Location:USA

Posted 03 June 2009 - 02:33 PM

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.
☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆

#12   2johnsons

2johnsons
  • Members
  • 189 posts
  • Real Name:Vaughn Johnson

Posted 13 June 2009 - 03:04 AM

How can I use this for my best sellers box?

Thank you

#13   ivyfleur

ivyfleur
  • Members
  • 88 posts
  • Real Name:Ivyfleur
  • Location:"Middle Earth"

Posted 15 June 2009 - 02:42 AM

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.

#14   mirza_yasir4

mirza_yasir4
  • Members
  • 105 posts
  • Real Name:Yasir Imran Mirza
  • Gender:Male
  • Location:Jeddah, Saudi Arabia

Posted 20 June 2009 - 09:52 AM

View Post~Kira, on Jun 3 2009, 02:33 PM, said:

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
Thanks and Regards
Yasir Imran Mirza
My Contributions

#15   mirza_yasir4

mirza_yasir4
  • Members
  • 105 posts
  • Real Name:Yasir Imran Mirza
  • Gender:Male
  • Location:Jeddah, Saudi Arabia

Posted 20 June 2009 - 09:56 AM

View Post2johnsons, on Jun 13 2009, 03:04 AM, said:

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
Thanks and Regards
Yasir Imran Mirza
My Contributions

#16   mirza_yasir4

mirza_yasir4
  • Members
  • 105 posts
  • Real Name:Yasir Imran Mirza
  • Gender:Male
  • Location:Jeddah, Saudi Arabia

Posted 20 June 2009 - 10:02 AM

View Postivyfleur, on Jun 15 2009, 02:42 AM, said:

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
Thanks and Regards
Yasir Imran Mirza
My Contributions

#17   ivyfleur

ivyfleur
  • Members
  • 88 posts
  • Real Name:Ivyfleur
  • Location:"Middle Earth"

Posted 21 June 2009 - 03:46 AM

View Postmirza_yasir4, on Jun 20 2009, 10:02 PM, said:

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.

#18   mirza_yasir4

mirza_yasir4
  • Members
  • 105 posts
  • Real Name:Yasir Imran Mirza
  • Gender:Male
  • Location:Jeddah, Saudi Arabia

Posted 23 June 2009 - 03:26 PM

View Postivyfleur, on Jun 21 2009, 04:46 AM, said:

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 by mirza_yasir4, 23 June 2009 - 03:28 PM.

Thanks and Regards
Yasir Imran Mirza
My Contributions

#19   KH221

KH221
  • Members
  • 8 posts
  • Real Name:Kristen

Posted 30 December 2010 - 10:26 PM

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
  }
?>


#20   bensuba

bensuba
  • Members
  • 20 posts
  • Real Name:ben
  • Gender:Male

Posted 09 August 2012 - 02:50 AM

It is not working for my website
Strange ...
www.tokokristik.com

Edited by bensuba, 09 August 2012 - 02:53 AM.