Hi. I want when I click on image of viewed product the product has been opened not the picture.
Look this is the code of also viewed products and link http://powerbody.lv/action/myofusion-probiotic-2270-g-detail
//Show also viewed
echo $pane->startPanel(JText::_('COM_VIRTUEMART_RECENT_PRODUCTS'), 'otcustom-title-tab-'.$i++);
$product_model = VmModel::getModel('product');
$recentproducts = shopFunctionsF::getRecentProductIds();
$perRow = VmConfig::get('products_per_row',3)>3 ? 3 : VmConfig::get('products_per_row',3);
$Browsecellwidth = ' width'.floor ( 100 / $perRow );?>
<div class="recentproducts">
<?php foreach ($recentproducts as $recentproduct_id) {
$recentproduct = $product_model->getProduct($recentproduct_id);
$product_model->addImages($recentproduct);
$this->assignRef('product', $recentproduct);?>
<div class="ot-custom-vmproduct product floatleft<?php echo $Browsecellwidth ?>">
<div class="spacer">
<div class="ot-custom-product">
<div class="ot-custom-product-i">
<div class="product-image">
<?php //echo $recentproduct->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$recentproduct->product_name.'" ',true,'class="modal"') ?>
<a class="modal" href="<?php echo JURI::root().$recentproduct->images[0]->file_url ?>" title="<?php echo $recentproduct->images[0]->file_title ?>">
<img class="browseProductImage" border=0 title="<?php echo $recentproduct->product_name ?>" src="<?php echo JURI::root().$recentproduct->images[0]->file_url_thumb; ?>" />
</a>
</div>
<div class="width64 floatleft">
<?php if(!empty($recentproduct->product_s_desc)) { ?>
<div class="product-s-desc">
<p class="product_s_desc">
<?php echo shopFunctionsF::limitStringByWord($recentproduct->product_s_desc, 50, '...') ?>
</p>
</div>
<?php } ?>
<?php if ($this->showRating) { ?>
<div class="vote">
<?php $maxrating = VmConfig::get('vm_maximum_rating_scale',5);
$ratingModel = VmModel::getModel('ratings');
$rating = $ratingModel->getRatingByProduct($recentproduct->virtuemart_product_id);
$this->assignRef('rating', $rating);
if (empty($rating)) { ?>
<span class="vote"><?php echo JText::_('COM_VIRTUEMART_UNRATED') ?></span>
<?php } else {
$ratingwidth = ( $rating->rating * 100 ) / $maxrating;
?>
<span class="vote">
<span title=" <?php echo (JText::_("COM_VIRTUEMART_RATING_TITLE") . $rating->rating . '/' . $maxrating) ?>" class="vmicon ratingbox" style="display:inline-block;">
<span class="stars-orange" style="width:<?php echo $ratingwidth;?>%">
</span>
</span>
</span>
<?php } ?>
</div>
<?php } ?>
</div>
<div class="width35 floatright">
<div class="product-addtocart">
<?php
echo JHTML::link($recentproduct->link, '<span>'.JText::_('COM_VIRTUEMART_PRODUCT_DETAILS').'</span>', array('title' => $recentproduct->product_name,'class' => 'product-details'));
//echo JHTML::link($recentproduct->link, JText::_('COM_VIRTUEMART_CART_ADD_TO'), array('title' => $recentproduct->product_name,'class' => 'product-details'));
?>
</div>
<div class="product-price" id="productPrice<?php echo $recentproduct->virtuemart_product_id ?>">
<?php if ($this->show_prices) {
if (!empty($recentproduct->prices['salesPrice'] ) ) echo '<span class="PricesalesPrice">'.$this->currency->createPriceDiv('salesPrice','',$recentproduct->prices,true).'</span><br />';
if ($this->currency->createPriceDiv('discountAmount','',$recentproduct->prices,true) != null) echo JText::_('') . '<span style="text-decoration: line-through;">'.$this->currency->createPriceDiv('priceWithoutTax','',$recentproduct->prices,true).'</span><br />';
if ($this->currency->createPriceDiv('salesPriceWithDiscount','',$recentproduct->prices,true) != null) echo JText::_('COM_VIRTUEMART_PRODUCT_SALESPRICE_WITH_DISCOUNT') . '<span class="PricesalesPrice">'.$this->currency->createPriceDiv('salesPriceWithDiscount','',$recentproduct->prices,true).'</span><br />';
} ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php } ?>
</div>
<?php echo $pane->endPane(); ?>
</div>
<div style="clear:both;"></div>
<?php if (!empty($this->product->customfieldsRelatedProducts)) {
echo $this->loadTemplate('relatedproducts');
} // Product customfieldsRelatedProducts END ?>
<?php
?>