News:

Looking for documentation? Take a look on our wiki

Main Menu

Alt Tags blank on Product Details Page

Started by communion, August 02, 2012, 08:56:22 AM

Previous topic - Next topic

communion

Hi I've modified template for default_images.php like this:

<div class="main-image">
<?php echo $this->product->images[0]->displayMediaFull('class="medium-image" alt="'.$this->product->text.'" ',true,' title="'.$this->product->product_name.'" ',true,' rel="prettyPhoto[pp_gal]" id="medium-image"'false ); ?></div>


Right now my title is pulled in from the product, but the Alt tag (image description) shows up underneath the main image instead of populating the alt tag.

Can someone point me in the right direction?

Thanks

ivus

Hi communion,

That's because your code is badly formed.

<div class="main-image">
   <?php echo $this->product->images[0]->displayMediaFull('class="medium-image" alt="'.$this->product->text.'" ',true,' title="'.$this->product->product_name.'" ',true,' rel="prettyPhoto[pp_gal]" id="medium-image"', false ); ?>
</div>

the function has the following parameters:

function displayMediaFull($imageArgs='', $lightbox=true, $effect="class='modal'", $description = true ){}

not sure what you are trying to pass into it...

I hope this helps. ;D