The easiest way is to merge default VirtueMart product details view using some tool like FileMerge (WinMerge) with template override view in template/html/com_virtuemart/productdetails/default.php. Please look at default code which should be similar to this one :
- Code: Select all
//vmdebug('view productdetails layout default show prices, prices',$this->product);
if ($this->product->prices['salesPrice']<=0 and VmConfig::get ('askprice', 1) and isset($this->product->images[0]) and !$this->product->images[0]->file_is_downloadable) {
?>
<a class="ask-a-question bold" href="<?php echo $this->askquestion_url ?>" rel="nofollow"><?php echo JText::_ ('COM_VIRTUEMART_PRODUCT_ASKPRICE') ?></a>
<?php
} else {
and the script at the top :
- Code: Select all
if(VmConfig::get('ask_question', 0)){
$boxAsk = "jQuery.fancybox({
href: '" . $this->askquestion_url . "',
type: 'iframe',
height: '550'
});";
}