Post by gmich » Thu Jan 16, 2014 3:14 am

I was wondering if I can have an image gallery in the tab section of the product page. I would like to have extra photos on a product but not as additional images under the product's main image.Is there an extension, especially a vQmod one, that I can use?

User avatar
Newbie

Posts

Joined
Wed Oct 24, 2012 12:08 am


Post by inactiveaccount9912 » Thu Jan 16, 2014 2:31 pm

Edit catalog/view/theme/yourtheme/template/product/product.tpl , find and remove:

Code: Select all

<?php if ($images) { ?>
      <div class="image-additional">
        <?php foreach ($images as $image) { ?>
        <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a>
        <?php } ?>
      </div>
      <?php } ?>
then find the line:

Code: Select all

<?php if ($thumb || $images) { ?>
and replace it with:

Code: Select all

<?php if ($thumb) { ?>
then after the line:

Code: Select all

<a href="#tab-description"><?php echo $tab_description; ?></a>
add the line:

Code: Select all

<?php if ($images) { ?><a href="#tab-gallery">Image Gallery</a><?php } ?>
then after the line:

Code: Select all

<div id="tab-description" class="tab-content"><?php echo $description; ?></div>
add the line:

Code: Select all

<?php if ($images) { ?>
<div id="tab-gallery" class="tab-content">
<div class="box-product">
 <?php foreach ($images as $image) { ?>
        <div><div class="image"><a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a></div></div>
  <?php } ?>
</div>
</div>
<?php } ?>

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am
Who is online

Users browsing this forum: No registered users and 2 guests