Hi,
I have VM2 running in Joomla 2.5 and I can't find where I remove the link from the product thumbnail, I want the TN image to remain but I want the viewer to only be able to click on the "Product Details" button.
Would be grateful if someone could tell me how this is done, I've had a good look and tried a few things but haven't been able to crack it.
Thanks.
did you manage to figure out how to remove the link?
Hello,
Something different (link product image to product details page) but you can easily modified:
http://forum.virtuemart.net/index.php?topic=100973.0
https://forum.virtuemart.net/index.php?topic=103351.0
http://forum.virtuemart.net/index.php?topic=90935.msg299146#msg299146
Regards
After 2 days and hours and hours of looking... I didnt find anything close to solving the problem of how to
Remove the Image Link under Product Detail Page.
I finally found out where this link switch resides... Its not in the template view or the product detail page..
Mod Edit:
administrator/components/com_virtuemart/helpers/image.php
There is a function for Displaymediafull in the beginning..
Change from True to False..
.... function displayMediaFull($imageArgs='',$lightbox=false,$effect ="class='modal'",$description = true ){ ....
After you set to false, the link will disappear.
There is no reason to hack the core for that, adjust it to your template files :o
There is no way to remove the link of the image from the administration of the template or from Virtuemart
There is a very simple way.
For example for category view, inside category/default.php around line 239 we have:
echo $product->images[0]->displayMediaThumb ('class="browseProductImage" border="0" title="' . $product->product_name . '" ', TRUE, 'class="modal"');
Change it to:
echo $product->images[0]->displayMediaThumb ('class="browseProductImage" border="0" title="' . $product->product_name . '" ', FALSE, 'class="modal"');
only change to FALSE from TRUE when calling displayMediaThumb for the url ... so simple...
Are you familiar with template overrides?? Have you take a look on the forum??
Use firebug to examine you site code and css styling: https://forum.virtuemart.net/index.php?topic=102850.0
Template Overrides:
Creating Template overrides: https://forum.virtuemart.net/index.php?topic=98505.0
Template System: https://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system
EXAMPLE:
To create a template override for category view: joomla_root_folder/components/com_virtuemart/views/category/tmpl/default.php
Just copy that file under joomla_root_folder/templates/your_joomla_template/html/com_virtuemart/category/default.php
If the folders are not exist please create them ... if you already use template overrides edit the overridden file.
Place your changes inside there!
Regards
I'm not talking about the Category Page.
That is not a problem.
Its the product detail page.
The image is linked to itself.
Then,
Edit create an override for the default_images.php under productdetails and make there your changes ...
Regards
There isnt anythign in default images that allow me to remove the link
/ Product Main Image
if (!empty($this->product->images[0])) {
?>
<div class="main-image">
<?php echo $this->product->images[0]->displayMediaFull('class="medium-image" id="medium-image"', false, "class='modal'", true); ?>
</div>
<?php } // Product Main Image END ?>
<?php
// Showing The Additional Images
// if(!empty($this->product->images) && count($this->product->images)>1) {
if (!empty($this->product->images) and count ($this->product->images)>1) {
?>
<div class="additional-images">
<?php
// List all Images
if (count($this->product->images) > 0) {
foreach ($this->product->images as $image) {
echo '<div class="floatleft">' . $image->displayMediaThumb('class="product-image"', true, 'class="modal"', true, true) . '</div>'; //'class="modal"'
}
}
?>
<div class="clear"></div>
Please lemme know. Thanks! Perhaps its something i am missing or have not much knowledge of thanks..
???
Your mail image does not have a link because you are using displaymediafull...
you mean the additional images?? What are you trying do to!! I cannot understand you... sorry
Its already done as i have mentioned on the first part...
haha
Product Detail Page.
There is a image for your product.
I do not want any link on that image. No link, no popup and no lightbox.
I dont want people to click the image
When using disaplaymediafull no one cannot click on the image, on the other hand place a false in the area i suggest ... still cannot understand, tests both and there isn't any "link" the user to clicks on... :o
I know this is over 6 months old but the original question was left unanswered. The same issue brought me here.
To remove the link attached to the main product image:
1. Open file administrator/components/com_virtuemart/helpers/mediahandler.php
2. Within the function displayIt (around line 576) find code around line 589 that reads: $lightboxImage = '<a '.$file_alt.' '.$effect.' href="'.$href.'">'.$image.'</a>';
3. Change the line of code to read: $lightboxImage = $image;
That's it!
BTW - there should absolutely be a setting to change this without code hack...IMHO