VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: roman5527 on September 03, 2021, 15:37:34 PM

Title: Disable open product detail page in popup
Post by: roman5527 on September 03, 2021, 15:37:34 PM
Hi, How i can disable open product img on detail page in popup window ?

vm version : 3.8.8

tahnks
Title: Re: Disable open product detail page in popup
Post by: jenkinhill on September 03, 2021, 18:29:47 PM
What do you want to happen instead of the fancybox?
Title: Re: Disable open product detail page in popup
Post by: roman5527 on September 03, 2021, 21:37:32 PM
Hi, i need disabled it on mobile . and I don't want to replace it with anything. I don't want anything to happen.
Title: Re: Disable open product detail page in popup
Post by: Jörgen on September 04, 2021, 11:28:57 AM
I do not know if there another way, but you can test this.

Make an override on
templates/mod_virtuemart_product/default.php (http://templates/mod_virtuemart_product/default.php)

You will find this code, approx line 33. Remove the link and opening of the image
echo JHTML::_ ('link', JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id), $image, array('title' => $product->product_name));
echo '<div class="clear"></div>';
$url = JRoute::_ ('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' .$product->virtuemart_category_id); ?>
<a href="<?php echo $url ?>"><?php echo $product->product_name ?></a>        <?php    echo '<div class="clear"></div>';


Jörgen
Title: Re: Disable open product detail page in popup
Post by: Studio 42 on September 08, 2021, 11:40:42 AM
Jorgen, he want disable it on product details.
File si by default : /components/com_virtuemart/views/productdetails/tmpl/default_images.php
replace
echo $image->displayMediaThumb("",true,"rel='vm-additional-images'", true, true, false, $width, $height);
with
echo $image->displayMediaThumb("",false,"rel='vm-additional-images'", true, true, false, $width, $height);
If you have an override in your template
See templates/YOURTEMPLATE/html/com_virtuemart//productdetails/default_images.php