Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Showing full-sized image on product_info.php


vinces

Recommended Posts

Hi,

 

I have a client who want the full sized image shown on the product_info.php page, so that the customer does not have to click to enlarge it. How would this be done? My hosting company is allowing me to invite 1 person to their unlimited hosting, so if somebody can answer this I will give them the free hosting. This is very important, as I need this done quickly. Any suggestions? Thanks.

David Amherst

Link to comment
Share on other sites

open admin... configuration... images edit small images height and width to be blank. this will load the images the exact size they are.

affects other places that calls the small image too, like the new products box for example.

 

try the contribution called mopics. that might do what you want even better.

 

i dont need hosting. just giving you some options.

Link to comment
Share on other sites

This is the code I use to show the actual image at actual size.

 

HTH

Carine

<?php
   if (tep_not_null($product_info['products_image'])) {
?>
         <table border="0" cellspacing="0" cellpadding="2" align="center">
           <tr>
             <td align="center" class="smallText">
<?php 
echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name']); 
?>
             </td>
           </tr>
         </table>
<?php
   }
?>

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

My vote goes for Carine !!!!!

 

Also around line 167 delete the following code to eliminate the the icons and click to enlarge stuff.

 

<script language="javascript"><!--

document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');

//--></script>

<noscript>

<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>

</noscript>

 

Happy web building Carine

 

Tom

Link to comment
Share on other sites

Yes, happily building along or sometimes more playing demolition man, noop I don't need/want this here anymore ... makes for shorter files to edit with just the actual code that you use ...

and I can always go back to check the originals as I put the original MS2 files through phpdocumentor, like here for everyone to see :

http://oscommerce.calimeross.com/ms2/doc_c...t_info.php.html

 

Tja Tom, it seems to be more like line 107 not 167 LOL

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

the old fashioned osCommerce way, I have this as the next line ...

</td></tr><tr><td class="main"><p><?php echo stripslashes($product_info['products_description']); ?></p>

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

Now I end up with the description 2x. Layout is full size image than text than extra image then description again. Did I mention I'm using webmakers extra image contr?

<?php
   if (tep_not_null($product_info['products_image'])) {
?>
         <table border="0" cellspacing="0" cellpadding="2" align="right">
           <tr>
             <td align="center" class="smallText">
<?php
  if (tep_not_null($product_info['products_image'])) {
?>
        <table border="0" cellspacing="0" cellpadding="2" align="center">
          <tr>
            <td align="center" class="smallText">
<?php
echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name']);
?>
</td></tr><tr><td class="main"><p><?php echo stripslashes($product_info['products_description']); ?></p>
            </td>
          </tr>
        </table>
<?php
  }
?>

 

 

romenyrr replace the java with the new code. Works nice without the extra image contri. around line 107

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...