News:

Support the VirtueMart project and become a member

Main Menu

[SOLVED] Click on product image > product details

Started by fiddled, September 10, 2012, 16:20:39 PM

Previous topic - Next topic

fiddled

When clicked I want my product images to go to product details and not open up an image dialog box.

I found an answer on this forum post:
https://forum.virtuemart.net/index.php?topic=101076.0

However when i make the suggested edit to templates/your_template/html/com_virtuemart/virtuemart/default_products.php It resizes my product images and aligns text to the right of the browse image and not under.  Then when I try to resize the image the text overlays it. 

Running 2.0.10

Looking for a solution.

Thanks!

fiddled

I solved part of it.  I can now click product images not on the main page but now images on my main page modules (featured) go directly to the image file link and not a pop-up or product details.

How can i have product images in modules (class=browseProductImage) link directly to product images?  What coding do I need to edit?

fiddled

andddd solved it.  To make module images go directly to product details you need to make changes to /templates/YOURTEMPLATE/html/mod_virtuemart_product/default.php

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

with 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"' ) );

Also change the class "browseimage" to "obrazek"