Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bestsellers scroller


Guest

Recommended Posts

thz , i will apreciate i try severall times in best_sellers.php , i can chnge colors / fonts , etc ... but i cant figure out to make this script like in medisave .... :shock:

Link to comment
Share on other sites

Ok i made a test install of this mod and its work on my side.

 

Did you puts file "best_sellers1.php" in your catalog/includes/boxes/ folder?

 

Then in catalog/includes/classes/boxes.php

 

Under this:

 

function infoBoxContents($contents) {

     $this->table_cellpadding = '3';

     $this->table_parameters = 'class="infoBoxContents"';

     $info_box_contents = array();

     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

     for ($i=0; $i<sizeof($contents); $i++) {

       $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="boxText"', 'text' => $contents[$i]['text']));

     }

     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

     return $this->tableBox($info_box_contents);

   }

 }

Add this:

class infoBox5 extends tableBox {

   function infoBox5($contents) {

     $info_box_contents = array();

     $info_box_contents[] = array('text' => '<marquee id="marquee1" onMouseOver="marquee1.stop();" onMouseOut="marquee1.start()" bgcolor="#FFFFCC" direction="up" scrollAmount="1" style="height:65">' . $this->infoBoxContents($contents) . '</marquee>');

     $this->table_cellpadding = '1';

     $this->table_parameters = 'class="infoBox"';

     $this->tableBox($info_box_contents, true);

   }



   function infoBoxContents($contents) {

     $this->table_cellpadding = '3';

     $this->table_parameters = 'class="infoBoxContents"';

     $info_box_contents = array();

     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

     for ($i=0; $i<sizeof($contents); $i++) {

       $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="boxText"', 'text' => $contents[$i]['text']));

     }

     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));

     return $this->tableBox($info_box_contents);

   }

 }

 

Find In /CATALOG/INCLUDES/COLUMN_RIGHT.php

 

if ($HTTP_GET_VARS['products_id']) {

   if (session_is_registered('customer_id')) {

     $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "' and global_product_notifications = '1'");

     $check = tep_db_fetch_array($check_query);

     if ($check['count'] > 0) {

       include(DIR_WS_BOXES . 'best_sellers.php');

     } else {

       include(DIR_WS_BOXES . 'product_notifications.php');

     }

   } else {

     include(DIR_WS_BOXES . 'product_notifications.php');

   }

 } else {

   include(DIR_WS_BOXES . 'best_sellers.php');

 }

 

Replace with:

if(strstr($HTTP_USER_AGENT,"MSIE")) 

{

$bsellers ="best_sellers1.php";

} 

else 

{

$bsellers ="best_sellers.php";

}



 if ($HTTP_GET_VARS['products_id']) {

   if (session_is_registered('customer_id')) {

     $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "' and global_product_notifications = '1'");

     $check = tep_db_fetch_array($check_query);

     if ($check['count'] > 0) {

       include(DIR_WS_BOXES . $bsellers);

     } else {

       include(DIR_WS_BOXES . 'product_notifications.php');

     }

   } else {

     include(DIR_WS_BOXES . 'product_notifications.php');

   }

 } else {

   include(DIR_WS_BOXES . $bsellers);

 }

 

Dont forget to add the best_sellers1.php file

into /catalog/includes/boxes and you should be done.

 

If that doesnt work then i dunno what else might be doing that to your best sellers box.

 

Also, it only works for IE internet explororer compatible browsers.

Link to comment
Share on other sites

ok , i have some questions :

 

1. what u call to best_sellers1.php is the one in the mod ??? if so , yes i installed in the directory ... so i have to best sellers , the original one and the other from the mod ...

 

2. i chg everthing has u told me to do ... but the problem persists ... im using IE6

 

3. can u send your current files that u modified .... best_sellers1.php / boxes.php / colunm_right.php

 

:oops: THZ , very thz for all teh trouble i arranged you ...

Link to comment
Share on other sites

If i send you my files it will only confuse you more cus i have so many mods and alterations installed that i would cause more errors than you could imagine.

 

Do not edit and just drop best_sellers1.php (the one from the mod) in your boxes folder.

 

 

This is my code in catalog/includes/classes/boxes.php

 

 

function infoBoxContents($contents) { 

     $this->table_cellpadding = '3'; 

     $this->table_parameters = 'class="infoBoxContents"'; 

     $info_box_contents = array(); 

     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); 

     for ($i=0; $i<sizeof($contents); $i++) { 

       $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="boxText"', 'text' => $contents[$i]['text'])); 

     } 

     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); 

     return $this->tableBox($info_box_contents); 

   } 

 } 



class infoBox5 extends tableBox { 

   function infoBox5($contents) { 

     $info_box_contents = array(); 

     $info_box_contents[] = array('text' => '<marquee id="marquee1" onMouseOver="marquee1.stop();" onMouseOut="marquee1.start()" bgcolor="#FFFFCC" direction="up" scrollAmount="1" style="height:65">' . $this->infoBoxContents($contents) . '</marquee>'); 

     $this->table_cellpadding = '1'; 

     $this->table_parameters = 'class="infoBox"'; 

     $this->tableBox($info_box_contents, true); 

   } 



   function infoBoxContents($contents) { 

     $this->table_cellpadding = '3'; 

     $this->table_parameters = 'class="infoBoxContents"'; 

     $info_box_contents = array(); 

     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); 

     for ($i=0; $i<sizeof($contents); $i++) { 

       $info_box_contents[] = array(array('align' => $contents[$i]['align'], 'form' => $contents[$i]['form'], 'params' => 'class="boxText"', 'text' => $contents[$i]['text'])); 

     } 

     $info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1'))); 

     return $this->tableBox($info_box_contents); 

   } 

 }

 

In my catalog/includes/column_right.php i have:

 

if(strstr($HTTP_USER_AGENT,"MSIE")) 

  { 

  $bsellers ="best_sellers1.php"; 

  } 

  else 

  { 

  $bsellers ="best_sellers.php"; 

  } 



 if ($HTTP_GET_VARS['products_id']) { 

   if (session_is_registered('customer_id')) { 

     $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . $customer_id . "' and global_product_notifications = '1'"); 

     $check = tep_db_fetch_array($check_query); 

     if ($check['count'] > 0) { 

       include(DIR_WS_BOXES . $bsellers); 

     } else { 

       include(DIR_WS_BOXES . 'product_notifications.php'); 

     } 

   } else { 

     include(DIR_WS_BOXES . 'product_notifications.php'); 

   } 

 } else { 

   include(DIR_WS_BOXES . $bsellers); 

 }

Link to comment
Share on other sites

Should be a fixed version now uploaded to the contrib section which should work with all snapshots.

 

Sorry for the delay in getting back to you - got caught up in a few problems on my own site dev.

 

Cheers,

Graham Wright

________________

Link to comment
Share on other sites

  • 5 weeks later...

that does exist,

 

but my problem is different. i install it, and all my prices get screwed. they all show up as 0, i got noidea why this does that. but also, the code to go in column right is wrong. the code in column right is different.

 

ok

 

thanks

kristofor

Don't die with the music in you!!!

 

Failure is just another boundary to sucess!!! But that doesn't mean your getting somewhere...

Link to comment
Share on other sites

Graham,

 

I am using loaded 5 and I am getting an error when I load according to your instructions.

 

Error message: Fatal error: Cannot instantiate non-existent class: infobox5 in /htdocs/includes/boxes/best_sellers1.php on line 40

 

URL: http://yourbasketstore.com/default.php?cPath=22

 

 

Any ideas?

 

Thanks,

 

Thomas

Should be a fixed version now uploaded to the contrib section which should work with all snapshots.

 

Sorry for the delay in getting back to you - got caught up in a few problems on my own site dev.

 

Cheers,

Link to comment
Share on other sites

Graham,

 

Take a look at column_right.php. The problem may be in there!

 

Thomas

 

Hello,

 

I will load up a copy of MS1 and see whats going on. Will post a new one if neccessary.

 

Cheers,

 

Graham Wright

www.medisave.co.uk

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Same problem here with loaded 5:

 

Class "infoBox5 extends tableBox" do exist in catalog/includes/classes/boxes.php!

 

Also in catalog/includes/classes/thema_boxes.php?!?

 

Any hints? I mean ANY? :)

 

Thanks in advance!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...