ihatedeskjets Posted March 5, 2008 Share Posted March 5, 2008 If like me you ended up with a blank space in your header and or had the problems with the database file then use the new instructions I uploaded to the contrib, you can see I've got it working properly now at www.fishguardferry.co.uk. This part of the code caused the slider to end up with a 0 width so it did not display so I commented it out if (sliderwidth > <?php echo $totalwidth; ?>) sliderwidth = <?php echo $totalwidth; ?>; Set picture height and width manually $x = 0; $height = 75; $totalwidth = 0; while ( $header_products = tep_db_fetch_array($header_products_query) ) { $width = 50; Set slider height to match picture height //Specify the slider's height var sliderheight="75"; Quote Link to comment Share on other sites More sharing options...
Guest Posted March 18, 2008 Share Posted March 18, 2008 QUESTIOSNS : - did someone found a way to have it working with enable / disable categories ? - does someone got an idea hwo to make the scrolling smoother ? I have enable/disable categories and it didn't work for me either.. any Ideas.. I see it used a lot and would love to use it.. noppie Quote Link to comment Share on other sites More sharing options...
mmph Posted April 1, 2008 Share Posted April 1, 2008 Hi, I have installed this and it seems to work okay. I am concerned that it is a lot of overhead (poor optimization), but not really sure. I'd like it to only show active products, I think I know how to do it but can't quite get the code correct. Maybe with these ideas, someone else can tie it together. In the scrip where this image scroller queries the database to find the images, the code reads: # execute the query $products_id_query = tep_db_query($union_str); Based on a filter used in the product_reviews.php to only use active products at about line 15, I think this could be modified to only call active products as well. Here is the code I'm trying to adapt, the product status part is and p.products_status = '1' Here's the whole query at 15 if product_review.php: $$product_info_query = tep_db_query("select p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); Does anyone know how to correctly add this "active" product filter to the query in the scrolling images? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2008 Share Posted April 18, 2008 Good day, I just tried installing this contribution and am unable to see any images whatsoever. The page source code suggests that it is working, I just don't see any images in IE7, FF2.0 or O9.35. Here is the outputted source code: <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr> <td align="center" valign="middle"><script type="text/javascript"> //Specify the slider's width (in pixels) var sliderwidth="760"; //Specify the slider's height var sliderheight="75"; // Change to match your image height //Specify the slider's slide speed (larger is faster 1-10) var slidespeed=2; //configure background color: slidebgcolor="#fffff1"; // background color //Specify the slider's images var leftrightslide=new Array(); var finalslide=''; leftrightslide[0]='<a href="http://www.ajmachineryonline.com/51b-radius-block-19-p-11830.html"><img src="images/hossfeld/p17.jpg" border="0" alt="51B Radius Block 19" width="50" height="75" valign="middle"></a>'; // if (sliderwidth > 50) // These 2 lines were causing 0 slider width so no display so I commented them out. // sliderwidth = 50; //Specify gap between each image (use HTML) var imagegap=" "; //Specify pixels gap between each slideshow rotation (use integer): var slideshowgap=0; var copyspeed=slidespeed; leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'; var iedom=document.all||document.getElementById; if (iedom) document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>'); var actualwidth=''; var cross_slide, ns_slide; function fillup() { if (iedom) { cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2; cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3; cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide; actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth; cross_slide2.style.left=actualwidth+slideshowgap+"px"; } else if (document.layers) { ns_slide=document.ns_slidemenu.document.ns_slidemenu2; ns_slide2=document.ns_slidemenu.document.ns_slidemenu3; ns_slide.document.write(leftrightslide); ns_slide.document.close(); actualwidth=ns_slide.document.width; ns_slide2.left=actualwidth+slideshowgap; ns_slide2.document.write(leftrightslide); ns_slide2.document.close(); } lefttime=setInterval("slideleft()",30); } window.onload=fillup; function slideleft() { if (iedom) { if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8)) cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"; else cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"; if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8)) cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"; else cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"; } else if (document.layers) { if (ns_slide.left>(actualwidth*(-1)+8)) ns_slide.left-=copyspeed; else ns_slide.left=ns_slide2.left+actualwidth+slideshowgap; if (ns_slide2.left>(actualwidth*(-1)+8)) ns_slide2.left-=copyspeed; else ns_slide2.left=ns_slide.left+actualwidth+slideshowgap; } } if (iedom||document.layers) { with (document) { write('<table border="0" cellspacing="0" cellpadding="0"><td>'); if (iedom) { write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">'); write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">'); write('<div id="test2" style="position:absolute;left:0px;top:0px"></div>'); write('<div id="test3" style="position:absolute;left:-1000px;top:0px"></div>'); write('</div></div>'); } else if (document.layers) { write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>'); write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>'); write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>'); write('</ilayer>'); } document.write('</td></table>'); } } </script> My Test Page I have enable/disable categories (and an extension for manufacturers) but they shouldn't interfer (only affects should be getting unwanted images) but that shouldn't matter. I installed "Scrolling Images Carousel With Hotlinks In Header" V1.2, 18 Jun 2005 with ihatedeskjets "easier install". What is wrong with this output? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 3, 2008 Share Posted May 3, 2008 Hi, I have installed this and it seems to work okay. I am concerned that it is a lot of overhead (poor optimization), but not really sure. I'd like it to only show active products, I think I know how to do it but can't quite get the code correct. Maybe with these ideas, someone else can tie it together. In the scrip where this image scroller queries the database to find the images, the code reads: # execute the query $products_id_query = tep_db_query($union_str); Based on a filter used in the product_reviews.php to only use active products at about line 15, I think this could be modified to only call active products as well. Here is the code I'm trying to adapt, the product status part is and p.products_status = '1' Here's the whole query at 15 if product_review.php: $$product_info_query = tep_db_query("select p.products_id, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); Does anyone know how to correctly add this "active" product filter to the query in the scrolling images? This is how I modified the query to select active products with images from the database. $header_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id in ('" . implode("', '", $prod_array) . "') and p.products_id = pd.products_id and p.products_status = '1' and p.products_image != '' order by rand() limit " . DISPLAY_SCROLLING_HEADER_PRODUCTS); I have inserted the and p.products_status = '1' (and a few other query mods) in nearly every applicable query. Then I used this ugly statement and p.products_image != '' to filter products from the query that did not have any image. Quote Link to comment Share on other sites More sharing options...
mmph Posted May 3, 2008 Share Posted May 3, 2008 This is how I modified the query to select active products with images from the database. $header_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id in ('" . implode("', '", $prod_array) . "') and p.products_id = pd.products_id and p.products_status = '1' and p.products_image != '' order by rand() limit " . DISPLAY_SCROLLING_HEADER_PRODUCTS); I have inserted the and p.products_status = '1' (and a few other query mods) in nearly every applicable query. Then I used this ugly statement and p.products_image != '' to filter products from the query that did not have any image. Thanks Doug, I don't know why I was having troubles with placing the active product filter before but its working for me now just as you've shown it here. Quote Link to comment Share on other sites More sharing options...
mmph Posted May 3, 2008 Share Posted May 3, 2008 Good day, I just tried installing this contribution and am unable to see any images whatsoever. Did you add the SQL and turn the scrolling images on from your admin panel? From your admin panel, CONFIGURATION --> SCROLLING PRODUCT HEADER, you must define how many picutres you want to be included. If this is set to 0 or has no value, you will not see the scrolling images. Quote Link to comment Share on other sites More sharing options...
puvens Posted May 4, 2008 Share Posted May 4, 2008 hello i have problem to put up the scrolling carusel to the top of the header do anywone know the solution on this problem i send a snapscreen so yo can see Quote Link to comment Share on other sites More sharing options...
mmph Posted May 4, 2008 Share Posted May 4, 2008 helloi have problem to put up the scrolling carusel to the top of the header do anywone know the solution on this problem i send a snapscreen so yo can see This is a result of your HTML table structure in the Header.php file where you inserted the code for the scrolling images. You need to make the appropriate corrections to the table variables such as <td> and <tr>, you need some HTML Table knowledge to get this straightened out. I had the same issue and resolved it by making some adjustments to my HTML tags here. Here is a an example of the code at or around line 63 in Header.php showing the structure of my file, this is only an example as I have a few other changes here from the stock file. /*HEADER.PHP LINE 63*/<table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'header_left.jpg', 'www.yourwebsitename.net') . '</a>'; ?></td> <td align="center" cellspacing="5" cellpadding="5"> <table border="0" width="500" cellspacing="0" cellpadding="5"> <tr> <!-- BOF scrolling header images --> <?php if ( DISPLAY_SCROLLING_HEADER_PRODUCTS > 0 ) { ?> <!-- table border="0" width="100%" align="center" cellspacing="0" cellpadding="1" --> <tr> <td align="center" valign="middle"><script type="text/javascript"> //Specify the slider's width (in pixels) var sliderwidth="400"; //Specify the slider's height var sliderheight="75"; //Specify the slider's slide speed (larger is faster 1-10) var slidespeed=2; //configure background color: slidebgcolor="#fffff1"; ...THE SCROLLING IMAGE CODE CONTINUES HERE... Quote Link to comment Share on other sites More sharing options...
puvens Posted May 4, 2008 Share Posted May 4, 2008 i have look a little bit of that code, , ,but i really dont understand, , , , , i change a few things but no luck i put out my code, so you can take a look at it, , , <?php /* $Id: header.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } } // check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> <?php // BOF: WebMakers.com Added: Center Shop // This goes before any other table of the shop if ( CENTER_SHOP_ON=='1' ) { // Is a bgroundcolor set for around the shop if ( CENTER_SHOP_BACKGROUND_ON=='1' ) { ?> <table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" bgcolor="<?php echo CENTER_SHOP_BACKGROUND_COLOR_OUT; ?>"> <tr><td> <?php } // Center the shop to what size and what bgcolor ?> <table CELLSPACING="2" CELLPADDING="0" BORDER="2" width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>"> <tr><td BGColor="ffffff"> <?php } // The rest of the <td> at the end of the footer // EOF: WebMakers.com Added: Center Shop ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php // Defined image and link from center_shop.php ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'image3.gif', STORE_NAME) . '</a>';?> <?php if ( DISPLAY_SCROLLING_HEADER_PRODUCTS > 0 ) { ?> <table border="0" width="100%" align="center" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="middle"><script type="text/javascript"> //Specify the slider's width (in pixels) var sliderwidth="200"; //Specify the slider's height var sliderheight="50"; //Specify the slider's slide speed (larger is faster 1-10) var slidespeed=2; //configure background color: slidebgcolor="#000000"; //Specify the slider's images var leftrightslide=new Array(); var finalslide=''; <?php $union = array(); $union[] = "SELECT p2c.products_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." p2c WHERE p2c.categories_id='".$current_category_id."'"; # Get the subcategory ID's # $sub_cats parameter will be populated with subcategory ID's tep_get_subcategories($sub_cats, $current_category_id); # Loop the $sub_cats array and start compiling the UNION query if (!empty($sub_cats)) { foreach ($sub_cats as $index => $cat_id){ $union[] = "SELECT p2c.products_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." p2c WHERE p2c.categories_id='".$cat_id."'"; } } # implode the UNION query to get the final string $union_str = implode(" UNION ", $union) . " ORDER BY products_id desc"; # unset some stuff...clean as we go unset($sub_cats, $union); # execute the query $products_id_query = tep_db_query($union_str); # Loop the array and populate the $prod_array with product ID's while($prods = tep_db_fetch_array($products_id_query)){ $prod_array[] = $prods['products_id']; } # free the result...clean as we go tep_db_free_result($products_id_query); $header_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id in ('" . implode("', '", $prod_array) . "') and p.products_id = pd.products_id order by rand() limit " . DISPLAY_SCROLLING_HEADER_PRODUCTS); $x = 0; $height = 50; $totalwidth = 0; while ( $header_products = tep_db_fetch_array($header_products_query) ) { $width = 65; // Get the image's information: if ($image_size = @getimagesize(DIR_WS_IMAGES . $header_products['products_image'])) { $ratio = $image_size[0] / $image_size[0]; // Scale the image if larger than the set width or height: if ($image_size[0] > $width || $image_size[0] > $height) { $rx = $image_size[0] / $width; $ry = $image_size[0] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } } $totalwidth += $width; } $alt = str_replace("'","\'",$header_products['products_name']); echo ' leftrightslide[' . $x++ . ']=\'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $header_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $header_products['products_image'], $alt, $width, $height, 'valign="middle"') . '</a>\';' . "\n"; } ?> // if (sliderwidth > <?php echo $totalwidth; ?>) // sliderwidth = <?php echo $totalwidth; ?>; //Specify gap between each image (use HTML) var imagegap=" "; //Specify pixels gap between each slideshow rotation (use integer): var slideshowgap=0; var copyspeed=slidespeed; leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'; var iedom=document.all||document.getElementById; if (iedom) document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>'); var actualwidth=''; var cross_slide, ns_slide; function fillup() { if (iedom) { cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2; cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3; cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide; actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth; cross_slide2.style.left=actualwidth+slideshowgap+"px"; } else if (document.layers) { ns_slide=document.ns_slidemenu.document.ns_slidemenu2; ns_slide2=document.ns_slidemenu.document.ns_slidemenu3; ns_slide.document.write(leftrightslide); ns_slide.document.close(); actualwidth=ns_slide.document.width; ns_slide2.left=actualwidth+slideshowgap; ns_slide2.document.write(leftrightslide); ns_slide2.document.close(); } lefttime=setInterval("slideleft()",30); } window.onload=fillup; function slideleft() { if (iedom) { if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8)) cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"; else cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowga p+"px"; if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8)) cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"; else cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowga p+"px"; } else if (document.layers) { if (ns_slide.left>(actualwidth*(-1)+8)) ns_slide.left-=copyspeed; else ns_slide.left=ns_slide2.left+actualwidth+slideshowgap; if (ns_slide2.left>(actualwidth*(-1)+8)) ns_slide2.left-=copyspeed; else ns_slide2.left=ns_slide.left+actualwidth+slideshowgap; } } if (iedom||document.layers) { with (document) { write('<table border="0" cellspacing="0" cellpadding="0"><td>'); if (iedom) { write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">'); write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">'); write('<div id="test2" style="position:absolute;right:0px;top:0px"></div>'); write('<div id="test3" style="position:absolute;right:0px;top:0px"></div>'); write('</div></div>'); } else if (document.layers) { write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>'); write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>'); write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>'); write('</ilayer>'); } document.write('</td></table>'); } } </script></td></center> </tr> </table> <?php } ?> </td> <td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> <td class="headerNavigation"> <?php echo $breadcrumb->trail(' » '); ?></td> <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> </tr> </table> <?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td> </tr> </table> <?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td> </tr> </table> <?php } ?> Quote Link to comment Share on other sites More sharing options...
puvens Posted May 4, 2008 Share Posted May 4, 2008 i moved the code around for a while, and was able to move up the "image carousel", , , , , But Not centered what can i do to make it happen? i really dont know what im gonna do next, , , , maybe is it like that the carousel doesnt working whit other contribs, such "centershop" background image anyway, , , i put up some picture how it looks right now and here´s my code again <?php /* $Id: header.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } } // check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> <?php // BOF: WebMakers.com Added: Center Shop // This goes before any other table of the shop if ( CENTER_SHOP_ON=='1' ) { // Is a bgroundcolor set for around the shop if ( CENTER_SHOP_BACKGROUND_ON=='1' ) { ?> <table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" bgcolor="<?php echo CENTER_SHOP_BACKGROUND_COLOR_OUT; ?>"> <tr><td> <?php } // Center the shop to what size and what bgcolor ?> <table CELLSPACING="2" CELLPADDING="0" BORDER="2" width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>"> <tr><td BGColor="ffffff"> <?php } // The rest of the <td> at the end of the footer // EOF: WebMakers.com Added: Center Shop ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php // Defined image and link from center_shop.php ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="left"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'image3.gif', STORE_NAME) . '</a>';?></td> <td align="right" valign="top"> <?php if ( DISPLAY_SCROLLING_HEADER_PRODUCTS > 0 ) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr> <td align="left" valign="middle"><script type="text/javascript"> //Specify the slider's width (in pixels) var sliderwidth="300"; //Specify the slider's height var sliderheight="65"; //Specify the slider's slide speed (larger is faster 1-10) var slidespeed=2; //configure background color: slidebgcolor="#000000"; //Specify the slider's images var leftrightslide=new Array(); var finalslide=''; <?php $union = array(); $union[] = "SELECT p2c.products_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." p2c WHERE p2c.categories_id='".$current_category_id."'"; # Get the subcategory ID's # $sub_cats parameter will be populated with subcategory ID's tep_get_subcategories($sub_cats, $current_category_id); # Loop the $sub_cats array and start compiling the UNION query if (!empty($sub_cats)) { foreach ($sub_cats as $index => $cat_id){ $union[] = "SELECT p2c.products_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." p2c WHERE p2c.categories_id='".$cat_id."'"; } } # implode the UNION query to get the final string $union_str = implode(" UNION ", $union) . " ORDER BY products_id desc"; # unset some stuff...clean as we go unset($sub_cats, $union); # execute the query $products_id_query = tep_db_query($union_str); # Loop the array and populate the $prod_array with product ID's while($prods = tep_db_fetch_array($products_id_query)){ $prod_array[] = $prods['products_id']; } # free the result...clean as we go tep_db_free_result($products_id_query); $header_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id in ('" . implode("', '", $prod_array) . "') and p.products_id = pd.products_id order by rand() limit " . DISPLAY_SCROLLING_HEADER_PRODUCTS); $x = 0; $height = 65; $totalwidth = 0; while ( $header_products = tep_db_fetch_array($header_products_query) ) { $width = 65; // Get the image's information: if ($image_size = @getimagesize(DIR_WS_IMAGES . $header_products['products_image'])) { $ratio = $image_size[0] / $image_size[0]; // Scale the image if larger than the set width or height: if ($image_size[0] > $width || $image_size[0] > $height) { $rx = $image_size[0] / $width; $ry = $image_size[0] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } } $totalwidth += $width; } $alt = str_replace("'","\'",$header_products['products_name']); echo ' leftrightslide[' . $x++ . ']=\'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $header_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $header_products['products_image'], $alt, $width, $height, 'valign="middle"') . '</a>\';' . "\n"; } ?> // if (sliderwidth > <?php echo $totalwidth; ?>) // sliderwidth = <?php echo $totalwidth; ?>; //Specify gap between each image (use HTML) var imagegap=" "; //Specify pixels gap between each slideshow rotation (use integer): var slideshowgap=0; var copyspeed=slidespeed; leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'; var iedom=document.all||document.getElementById; if (iedom) document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>'); var actualwidth=''; var cross_slide, ns_slide; function fillup() { if (iedom) { cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2; cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3; cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide; actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth; cross_slide2.style.left=actualwidth+slideshowgap+"px"; } else if (document.layers) { ns_slide=document.ns_slidemenu.document.ns_slidemenu2; ns_slide2=document.ns_slidemenu.document.ns_slidemenu3; ns_slide.document.write(leftrightslide); ns_slide.document.close(); actualwidth=ns_slide.document.width; ns_slide2.left=actualwidth+slideshowgap; ns_slide2.document.write(leftrightslide); ns_slide2.document.close(); } lefttime=setInterval("slideleft()",30); } window.onload=fillup; function slideleft() { if (iedom) { if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8)) cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"; else cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"; if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8)) cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"; else cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"; } else if (document.layers) { if (ns_slide.left>(actualwidth*(-1)+8)) ns_slide.left-=copyspeed; else ns_slide.left=ns_slide2.left+actualwidth+slideshowgap; if (ns_slide2.left>(actualwidth*(-1)+8)) ns_slide2.left-=copyspeed; else ns_slide2.left=ns_slide.left+actualwidth+slideshowgap; } } if (iedom||document.layers) { with (document) { write('<table border="0" cellspacing="0" cellpadding="0"><td>'); if (iedom) { write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">'); write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">'); write('<div id="test2" style="position:absolute;right:0px;top:0px"></div>'); write('<div id="test3" style="position:absolute;right:0px;top:0px"></div>'); write('</div></div>'); } else if (document.layers) { write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>'); write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>'); write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>'); write('</ilayer>'); } document.write('</td></table>'); } } </script></td></center> </tr> </table> <?php } ?> <?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="headerNavigation"> <td class="headerNavigation"> <?php echo $breadcrumb->trail(' » '); ?></td> <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> </tr> </table> <?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td> </tr> </table> <?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td> </tr> </table> <?php } ?> Quote Link to comment Share on other sites More sharing options...
mmph Posted May 5, 2008 Share Posted May 5, 2008 i moved the code around for a while, and was able to move up the "image carousel", , , , , But Not centeredwhat can i do to make it happen? i really dont know what im gonna do next, , , , maybe is it like that the carousel doesnt working whit other contribs, such "centershop" background image anyway, , , i put up some picture how it looks right now You need to continue adjusting your HTML Table structure; if you don't understand HTML, this will be challenging for you to work it out. I don't believe your problem has anything to do with PHP other installed contributions. Quote Link to comment Share on other sites More sharing options...
puvens Posted May 5, 2008 Share Posted May 5, 2008 Ok , Now is the image carousel centered and up of the top in the head :rolleyes: Thanks for the direction you gave me, it was very helping :thumbsup: i was sitting alots of hours, But i Solved the problem if any other have that problem i had, I put up my code, so you can compare your code with mine! <?php /* $Id: header.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ // check if the 'install' directory exists, and warn of its existence if (WARN_INSTALL_EXISTENCE == 'true') { if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) { $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning'); } } // check if the configure.php file is writeable if (WARN_CONFIG_WRITEABLE == 'true') { if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) { $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning'); } } // check if the session folder is writeable if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') { if (STORE_SESSIONS == '') { if (!is_dir(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning'); } elseif (!is_writeable(tep_session_save_path())) { $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning'); } } } // check session.auto_start is disabled if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) { if (ini_get('session.auto_start') == '1') { $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning'); } } if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) { if (!is_dir(DIR_FS_DOWNLOAD)) { $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning'); } } if ($messageStack->size('header') > 0) { echo $messageStack->output('header'); } ?> <?php // BOF: WebMakers.com Added: Center Shop // This goes before any other table of the shop if ( CENTER_SHOP_ON=='1' ) { // Is a bgroundcolor set for around the shop if ( CENTER_SHOP_BACKGROUND_ON=='1' ) { ?> <table width="100%" cellpadding="<?php echo CENTER_SHOP_PADDING; ?>" cellspacing="0" border="0" bgcolor="<?php echo CENTER_SHOP_BACKGROUND_COLOR_OUT; ?>"> <tr><td> <?php } // Center the shop to what size and what bgcolor ?> <table CELLSPACING="2" CELLPADDING="0" BORDER="2" width="<?php echo CENTER_SHOP_WIDTH; ?>" align="center" BGCOLOR="<?php echo CENTER_SHOP_BACKGROUND_COLOR; ?>"> <tr><td BGColor="ffffff"> <?php } // The rest of the <td> at the end of the footer // EOF: WebMakers.com Added: Center Shop ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php // Defined image and link from center_shop.php ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr class="header"> <td valign="middle" width="32%"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'image3.gif', STORE_NAME) . '</a>';?></td> <td align="center" valign="middle"> <?php if ( DISPLAY_SCROLLING_HEADER_PRODUCTS > 0 ) { ?> <table border="0" align="left" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="middle"><script type="text/javascript"> //Specify the slider's width (in pixels) var sliderwidth="330"; //Specify the slider's height var sliderheight="75"; //Specify the slider's slide speed (larger is faster 1-10) var slidespeed=2; //configure background color: slidebgcolor="#000000"; //Specify the slider's images var leftrightslide=new Array(); var finalslide=''; <?php $union = array(); $union[] = "SELECT p2c.products_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." p2c WHERE p2c.categories_id='".$current_category_id."'"; # Get the subcategory ID's # $sub_cats parameter will be populated with subcategory ID's tep_get_subcategories($sub_cats, $current_category_id); # Loop the $sub_cats array and start compiling the UNION query if (!empty($sub_cats)) { foreach ($sub_cats as $index => $cat_id){ $union[] = "SELECT p2c.products_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." p2c WHERE p2c.categories_id='".$cat_id."'"; } } # implode the UNION query to get the final string $union_str = implode(" UNION ", $union) . " ORDER BY products_id desc"; # unset some stuff...clean as we go unset($sub_cats, $union); # execute the query $products_id_query = tep_db_query($union_str); # Loop the array and populate the $prod_array with product ID's while($prods = tep_db_fetch_array($products_id_query)){ $prod_array[] = $prods['products_id']; } # free the result...clean as we go tep_db_free_result($products_id_query); $header_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id in ('" . implode("', '", $prod_array) . "') and p.products_id = pd.products_id order by rand() limit " . DISPLAY_SCROLLING_HEADER_PRODUCTS); $x = 0; $height = 75; $totalwidth = 0; while ( $header_products = tep_db_fetch_array($header_products_query) ) { $width = 75; // Get the image's information: if ($image_size = @getimagesize(DIR_WS_IMAGES . $header_products['products_image'])) { $ratio = $image_size[0] / $image_size[0]; // Scale the image if larger than the set width or height: if ($image_size[0] > $width || $image_size[0] > $height) { $rx = $image_size[0] / $width; $ry = $image_size[0] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } } $totalwidth += $width; } $alt = str_replace("'","\'",$header_products['products_name']); echo ' leftrightslide[' . $x++ . ']=\'<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $header_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $header_products['products_image'], $alt, $width, $height, 'valign="middle"') . '</a>\';' . "\n"; } ?> // if (sliderwidth > <?php echo $totalwidth; ?>) // sliderwidth = <?php echo $totalwidth; ?>; //Specify gap between each image (use HTML) var imagegap=" "; //Specify pixels gap between each slideshow rotation (use integer): var slideshowgap=0; var copyspeed=slidespeed; leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'; var iedom=document.all||document.getElementById; if (iedom) document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+leftrightslide+'</span>'); var actualwidth=''; var cross_slide, ns_slide; function fillup() { if (iedom) { cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2; cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3; cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide; actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth; cross_slide2.style.left=actualwidth+slideshowgap+"px"; } else if (document.layers) { ns_slide=document.ns_slidemenu.document.ns_slidemenu2; ns_slide2=document.ns_slidemenu.document.ns_slidemenu3; ns_slide.document.write(leftrightslide); ns_slide.document.close(); actualwidth=ns_slide.document.width; ns_slide2.left=actualwidth+slideshowgap; ns_slide2.document.write(leftrightslide); ns_slide2.document.close(); } lefttime=setInterval("slideleft()",30); } window.onload=fillup; function slideleft() { if (iedom) { if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8)) cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"; else cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"; if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8)) cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"; else cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"; } else if (document.layers) { if (ns_slide.left>(actualwidth*(-1)+8)) ns_slide.left-=copyspeed; else ns_slide.left=ns_slide2.left+actualwidth+slideshowgap; if (ns_slide2.left>(actualwidth*(-1)+8)) ns_slide2.left-=copyspeed; else ns_slide2.left=ns_slide.left+actualwidth+slideshowgap; } } if (iedom||document.layers) { with (document) { write('<table border="0" cellspacing="0" cellpadding="0"><td>'); if (iedom) { write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">'); write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">'); write('<div id="test2" style="position:absolute;right:0px;top:0px"></div>'); write('<div id="test3" style="position:absolute;right:0px;top:0px"></div>'); write('</div></div>'); } else if (document.layers) { write('<ilayer width='+sliderwidth+' height='+sliderheight+' name="ns_slidemenu" bgColor='+slidebgcolor+'>'); write('<layer name="ns_slidemenu2" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>'); write('<layer name="ns_slidemenu3" left=0 top=0 onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed"></layer>'); write('</ilayer>'); } document.write('</td></table>'); } } </script></td> </tr> </table> <?php } ?> <td align="middle" valign="bottom" width="20%"> <?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="1"> <tr class="headerNavigation"> <td class="headerNavigation"> <?php echo $breadcrumb->trail(' » '); ?></td> <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> </tr> </table> <?php if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerError"> <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td> </tr> </table> <?php } if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="headerInfo"> <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td> </tr> </table> <?php } ?> Quote Link to comment Share on other sites More sharing options...
puvens Posted May 5, 2008 Share Posted May 5, 2008 When you going into the store and look at the carousel, it shows all products, in my case clothe´s then when you click on , , skirts, , for just looking on just that particular skirt, , , the carousel just showing skirts, , , that´s not good i think, , , , because if you only have 2-3 skirts in your store, , it seem´s a little bit poor i hope you understand what im trying to say :rolleyes: how can i fix the code that it´s Showing All clothes all the time? can anyone help me with that? Quote Link to comment Share on other sites More sharing options...
mmph Posted May 5, 2008 Share Posted May 5, 2008 When you going into the store and look at the carousel, it shows all products, in my case clothe´sthen when you click on , , skirts, , for just looking on just that particular skirt, , , the carousel just showing skirts, , , that´s not good i think, , , , because if you only have 2-3 skirts in your store, , it seem´s a little bit poor i hope you understand what im trying to say :rolleyes: how can i fix the code that it´s Showing All clothes all the time? can anyone help me with that? I'm not the best with code myself but I believe this add-in module makes an array called leftrightslide from products from the active catagory and any subcatagory which contains items with this piece of code and then references leftrightslide several times throughout the add-in. The array is at the top section of the add-in modules code about 10 lines down: $union[] = "SELECT p2c.products_id FROM ".TABLE_PRODUCTS_TO_CATEGORIES." p2c WHERE p2c.categories_id='".$current_category_id."'"; Maybe someone else can help with how to change this statement to always get products from the top rather than filtering down to the active catagory for you. Or better yet, possibley add a statement which tested the amount of items in a catagory, if less than than a set amount, the module could then default to include all catagories. Quote Link to comment Share on other sites More sharing options...
Guest Posted May 18, 2008 Share Posted May 18, 2008 Did you add the SQL and turn the scrolling images on from your admin panel? From your admin panel, CONFIGURATION --> SCROLLING PRODUCT HEADER, you must define how many picutres you want to be included. If this is set to 0 or has no value, you will not see the scrolling images. Yep, everything set okay. The source code shows the stuff getting written like: leftrightslide[0]='<a href="http://www.ajmachineryonline.com/31b-radius-block-p-11762.html"><img src="images/hossfeld/p16a.jpg" border="0" alt="31B Radius Block 4" width="100" height="75" valign="middle"><\/a>'; blah blah leftrightslide[14]='<a href="http://www.ajmachineryonline.com/20b9-form-die-18-and-20-p-11448.html"><img src="images/hossfeld/p37b.jpg" border="0" alt="20B9 Form Die 18 and 20" width="100" height="75" valign="middle"><\/a>'; Separately, I've got vertical scrollers that work. I fail to see what is wrong with the code/installation. Quote Link to comment Share on other sites More sharing options...
bluballs Posted June 29, 2008 Share Posted June 29, 2008 How do I down load this file? Is it part of the OS package? I am looking for the scrolling pics for a banner on my website. Quote Link to comment Share on other sites More sharing options...
netley Posted September 6, 2008 Share Posted September 6, 2008 Hi, I do like this addon and am trying it in my site. I am using it within my header, so it is displayed on every page. The one thing i don't like is the way it only displays products within the category you are viewing, to the point of viewing product info and the scroller is only displaying that product. What i would like the scroller to do is either; 1) Display a random selection of all products on all pages. If the above is not possible, how about the following option. 2) Display a static image if the scroller is only displaying one product (along the lines of the FIMBLE addon) I have had a play around with the scroller code to acheive either of the above, with little success. Thanks, Quote Link to comment Share on other sites More sharing options...
puvens Posted November 22, 2008 Share Posted November 22, 2008 *netley* hi darren Did you found any solution to this problem??? i got this problem my self if not do anyone else know how to do?? /Peter Hi, I do like this addon and am trying it in my site. I am using it within my header, so it is displayed on every page. The one thing i don't like is the way it only displays products within the category you are viewing, to the point of viewing product info and the scroller is only displaying that product. What i would like the scroller to do is either; 1) Display a random selection of all products on all pages. If the above is not possible, how about the following option. 2) Display a static image if the scroller is only displaying one product (along the lines of the FIMBLE addon) I have had a play around with the scroller code to acheive either of the above, with little success. Thanks, Quote Link to comment Share on other sites More sharing options...
Rednes Posted February 12, 2009 Share Posted February 12, 2009 I would like to know if it's possible to let the slider start with the bar filled. At this moment, the pics are loaded and begin to run from the right side, so there is an empty bar at start. Is it possible to let the pics load so they fill the bar right away and then just run from the left to the right? So you dont have an empty bar when it starts to scroll... hope I'm clear enough on the question. thx in advance! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 16, 2013 Share Posted April 16, 2013 Hi, is there anyone still using? I not very sure where is DISPLAY_SCROLLING_HEADER_PRODUCTS being declared. Any one there to help? Quote Link to comment Share on other sites More sharing options...
germ Posted April 16, 2013 Share Posted April 16, 2013 It's a value inserted into the configuration table in the DB when installed. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > 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.