Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Prob very easy


ricksteruk2005

Recommended Posts

Posted

Im using Extra images v1.6.1

 

Where the extra images are displayed, 3 of the images are smaller than the selected one (see screen shot)

 

screen.jpg

 

 

What i need to get is all the images the same size and aligned under the header, the bit of code that calls the images is as follows:

 

<?php
 /*
 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2002 osCommerce

 Released under the GNU General Public License

 Based on Extra images 1.4 from Mikel Williams
 Thanks to Mikel Williams, StuBo, moosey_jude and Randelia
 Modifications: Xav [email protected]

 */


$products_extra_images_query = tep_db_query("SELECT products_extra_image, products_extra_images_id FROM " . TABLE_PRODUCTS_EXTRA_IMAGES . " WHERE products_id='" . $product_info['products_id'] . "'");
if (tep_db_num_rows($products_extra_images_query) >= 1){
$rowcount_value=4;  //number of extra images per row	
$rowcount=1;
?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     	<TR>
  <TD>
    <table border="0" width="50%"  align="right" cellspacing="1" cellpadding="2" class="infoBox">
      <TR>
      <TD CLASS="infoBoxHeading" align ="center">
        <?php echo (TEXT_EXTRA_IMAGES); ?>
      </td>
      </tr>
</TABLE>
     </td>
   </tr>

<TR>
  <TD>
    <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
      <TR>
<?php	

//$products_extra_images_query = tep_db_query("SELECT products_extra_image, products_extra_images_id FROM " . TABLE_PRODUCTS_EXTRA_IMAGES . " WHERE products_id='" . $product_info['products_id'] . "'");
while ($extra_images = tep_db_fetch_array($products_extra_images_query)) {
?>
	<TD CLASS="infoBoxContents" align ="center">
	<?php echo "<a href=\"java script:popupWindow('" . tep_href_link(FILENAME_POPUP_EXTRA_IMAGES, 'peiID=' . $extra_images['products_extra_images_id']) . "')\">" . tep_image(DIR_WS_IMAGES . $extra_images['products_extra_image'], addslashes($product_info['products_name']),SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2, "hspace='5' vspace='5'". " onMouseOver=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $extra_images['products_extra_image'] . "'\" onMouseOut=\"java script:window.document.prodimg.src='" . DIR_WS_IMAGES . $product_info['products_image'] . "'\"" ) . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>		</td>
<?php
if ($rowcount == $rowcount_value){echo '</tr><tr>'; $rowcount=1;}
else {$rowcount=$rowcount+1;}
}
?>	
   </tr>
</TABLE>
     </td>
   </tr>

<?php
}
?>    

 

I have been scratching my head for hours, anyone got any suggestions please?

I dont help with templates (thats what the seller is for)

 

th search function will often help, when it dont try this in google.

 

site:http://www.oscommerce.com/forums then your search word

Posted
SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2

why you dividing the value of small images?

 

it should be:

SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT

Please read this line: Do you want to find all the answers to your questions? click here. As for contribution database it's located here!

8 people out of 10 don't bother to read installation manuals. I can recommend: if you can't read the installation manual, don't bother to install any contribution yourself.

Before installing contribution or editing/updating/deleting any files, do the full backup, it will save to you & everyone here on the forum time to fix your issues.

Any issues with oscommerce, I am here to help you.

Posted

because i need them smaller than the main thumbnails, i want all the additional images about half the size of the main thumbnail shown in product_info.php

I dont help with templates (thats what the seller is for)

 

th search function will often help, when it dont try this in google.

 

site:http://www.oscommerce.com/forums then your search word

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...