News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Product Image Link to Details Page

Started by cimran, February 04, 2014, 16:06:22 PM

Previous topic - Next topic

cimran

On http://jewelryinternet.com/index.php/rings
When i click any image of product, it only pop up but i want that it should be linked to its detail page instead of JPG popup

Please help

Acolytte

Hi, i had the same problem:

Find this file:
components/com_virtuemart/views/category/tmpl/default.php

Replace this code:
echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',true,'class="modal"');

with this one:

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 ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',false,'class="modal"' ) );

And in file:
components/com_virtuemart/views/virtuemart/tmpl/default_products.php

Find and replace this code:

if ($product->images) {
                  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 ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',true,'class="modal"' ) );
               }


with this one:

if ($product->images) {
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 ), $product->images[0]->displayMediaThumb( 'class="featuredProductImage" border="0"',false,'class="modal"' ) );
               }



Its 100%, still, i recomend backup

Acolytte


cimran

Thank you very much but it does not work
can you please send me updated files


best regards