Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How can I clear the right float on a single product?


taylermagnuson

Recommended Posts

Hello tayler @@taylermagnuson,

 

You could try this:

 

if products_id=365

<div class="clearfix"></div>

Link to comment
Share on other sites

Hello @@taylermagnuson,

 

This was not the good solution, sorry.

 

Try this:

in: product_info.php

 

If you are using big product image(s):

 

Find line 109-113:

?>

    <div id="piGal" data-imgcount="<?php echo $photoset_layout; ?>">

<?php

Replace with:

        if ($product_info['products_id'] == 365) {
        	?>
        	<div id="piGal" style="float:none;" data-imgcount="<?php echo $photoset_layout; ?>">
        	<?php
        } else {
        	?>
        	<div id="piGal" data-imgcount="<?php echo $photoset_layout; ?>">
        	<?php
        }

If you are using only one small image :

Find line 135-137 :

?>

    <div id="piGal">

Replace with:

        if ($product_info['products_id'] == 365) {
        	?>
        	<div id="piGal" style="float:none;">
        	<?php
        } else {
        	?>
        	<div id="piGal">
        	<?php
        }

Where 365 is your product id to apply this modification.

 

To change the image size you can include for the first example this line in the first conditions

          echo tep_image(DIR_WS_IMAGES . $pi['image'], '', 200, 200, 'id="piGalImg_' . $pi_counter . '"');

where 200 the size for the image of product 365 and put in the second part (all other products) the unmodified line:

should look then like this:

        if ($product_info['products_id'] == 365) {
            ?>
            <div id="piGal" style="float:none;">
            <?php
            echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), 200, 200, 'id="piGalImg_' . $pi_counter . '" data-highres="'. DIR_WS_IMAGES . $product_info['products_image'] .'"');
        } else {
            ?>
            <div id="piGal">
            <?php
            echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), '', '', 'id="piGalImg_' . $pi_counter . '" data-highres="'. DIR_WS_IMAGES . $product_info['products_image'] .'"');
        }
        ?>
    </div>

Similar for the second example.

 

regards

Rainer

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...