Hi,
Sorry for the little late reply. Here is the solution:
1- Open this PHP file: /templates/flexible_lightmrt/html/com_virtuemart/productdetails/default.php
2- Find this line:
<li><a href="<?php echo JURI::root().$this->product->images[$ImageId]->file_url;?>" rel="<?php echo $this->product->images[$ImageId]->file_meta;?>" title="<?php echo $this->product->images[$ImageId]->file_description;?>" data-image="<?php echo JURI::root().$this->product->images[$ImageId]->file_url;?>" data-zoom-image="<?php echo JURI::root().$this->product->images[$ImageId]->file_url;?>" class="<?php if ($i=='1') echo 'active';?> fancybox2"> <span><?php echo $this->product->images[$ImageId]->displayMediaThumb('',false,"class=''",true,false,false,0,0); ?>
<?php if ($params->get('show_subtitle') and !empty($this->product->images[$ImageId]->file_description)) { ?>
<div class="subTitle"><?php echo $this->product->images[$ImageId]->file_description;?></div>
<?php } ?>
</span> </a></li>
3- Replace it with this:
<li><a <?php if ($this->product->images[$ImageId]->file_extension == 'pdf') { ?> onClick="window.open('<?php echo JURI::root().$this->product->images[$ImageId]->file_url;?>', '_blank')"<?php } ?> href="<?php echo JURI::root().$this->product->images[$ImageId]->file_url;?>" rel="<?php echo $this->product->images[$ImageId]->file_meta;?>" title="<?php echo $this->product->images[$ImageId]->file_description;?>" data-image="<?php echo JURI::root().$this->product->images[$ImageId]->file_url;?>" data-zoom-image="<?php echo JURI::root().$this->product->images[$ImageId]->file_url;?>" class="<?php if ($i=='1') echo 'active';?> fancybox2"> <span><?php echo $this->product->images[$ImageId]->displayMediaThumb('',false,"class=''",true,false,false,0,0); ?>
<?php if ($params->get('show_subtitle') and !empty($this->product->images[$ImageId]->file_description)) { ?>
<div class="subTitle"><?php echo $this->product->images[$ImageId]->file_description;?></div>
<?php } ?>
</span> </a></li>