Product image in VM Category Page

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Thu Dec 20, 2012 10:10 am
Reply with quote
Report this post
Using the Joomla 2.5 template, when you are on a category page within Virtuemart, is there a way that you can click on the thumbnail of a product and not see a pop-up of the image but replace it with a link to the product page instead?

Thanks
User avatar
Gold Boarder

teitbite
Sun Dec 23, 2012 1:36 am
Reply with quote
Report this post
Hi

You need to edit /html/com_virtuemart/category/default.php file and change this code in line 202:

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


to

Code: Select all
echo '<a href="$product->link" title="$product->product_name">' . $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',true,'"') . '</a>';
User avatar
Moderator

GK User
Thu Jan 10, 2013 4:05 pm
Reply with quote
Report this post
Thanks. I've changed the code but when I click it doesn't take me to a product page but just the product image in the window, rather than pop-up?
What can I type to go to the VM product page itself.
Thanks
User avatar
Gold Boarder

teitbite
Thu Jan 10, 2013 6:53 pm
Reply with quote
Report this post
Hi

Please show me the example page with replaced code.
User avatar
Moderator

GK User
Mon Jan 21, 2013 4:15 pm
Reply with quote
Report this post
Sorry I can't do this because I'm having to build the site locally using XAMPP.
Can you think of anything else I can try in the meantime?
If worse comes to worst, I'm happy to remove link entirely...
I just don't want a pop up modal image there.
Thanks
User avatar
Gold Boarder

teitbite
Tue Jan 22, 2013 2:30 am
Reply with quote
Report this post
Hi

There is no need to remove it, please try replace it with that (without seeing it, I'm guessing so it may be a blind shot):

Code: Select all
echo $product->images[0]->displayMediaThumb('class="browseProductImage" border="0" title="'.$product->product_name.'" ',false,'.$product->link.');
User avatar
Moderator

GK User
Tue Jan 22, 2013 8:43 am
Reply with quote
Report this post
Thanks teitbite. That new snippet of code has stopped the product images loading in a modal pop up window and now nothing at all happens when you click on them... which is better.
When I've got the site online I'll drop you a line and hopefully we can work out how to make the images link to the product themselves! Thanks :-)
User avatar
Gold Boarder

teitbite
Wed Jan 23, 2013 2:01 am
Reply with quote
Report this post
Hi

Yes please let me know when it'll be online, because right now I could just guess the correct code for this.
User avatar
Moderator


cron