link picture to product details in category view

GK User
Thu Mar 22, 2012 11:08 am
Maybe other forum users already have found the solution ?

I would like to make clicking on product picture to open product details in category view, not the lightbox.

Thanks in advance.
User avatar
Gold Boarder

teitbite
Fri Mar 23, 2012 2:19 am
Hi

This should be done it VM style. Please send me FTP access and show an example page.
User avatar
Moderator

teitbite
Sat Mar 24, 2012 7:53 pm
Hi

Done. To make this I had to edit file /templates/gk_esport/html/com_virtuemart/category/default.php line 196:

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 . '"><img src="' . $product->images[0]->file_url_thumb . '" alt="' . $product->product_name . '" /></a>';
User avatar
Moderator

GK User
Sat Mar 24, 2012 8:27 pm
Thanks!
User avatar
Gold Boarder

teitbite
Sat Mar 24, 2012 10:49 pm
Hi

Glad I could help.
User avatar
Moderator

GK User
Sun May 06, 2012 7:21 pm
Hi, teitbite,

Since I lose these changes every time I update the template and overwrite com_virtuemart folder...

Can I follow a topic?
or mark it so that I can easily find the changes that I will need to remake after each update ...

Sorry my google english ok! ;)

Tks
User avatar
Senior Boarder

teitbite
Mon May 07, 2012 2:42 pm
Hi

That's odd. I've made this modification in /templates/gk_esport/html/com_virtuemart/category/default.php which is a template's override for VM and VM update will not affect that. Are You sure it hasn't dissapeared after template update after all ?
User avatar
Moderator

GK User
Tue May 08, 2012 1:55 am
I think I'm doing wrong then ... I updated the VM by the component, and then downloaded the latest version of the template (2.8.2) and replaced the entire folder "com_virtuemart"

The procedure is wrong?
User avatar
Senior Boarder

teitbite
Tue May 08, 2012 3:23 pm
Hi

No it's me who's wrong. I forgot that VM style needs to be updated in template :)

So Yes You need to make the same change again. I believe I've described it good, but if You'll have a problem please let me know.
User avatar
Moderator

GK User
Sun Jan 06, 2013 6:12 pm
Hello,

it is working with products listed in category view. But if categories are listed in the same way as products (if menu has more than one level) the image is not active.

You can look here what I mean : http://prezervatyvai.lt/lubrikantai

What file and how to change it, that clicking on item opens it.

Thanks.
teitbite wrote:Hi

No it's me who's wrong. I forgot that VM style needs to be updated in template :)

So Yes You need to make the same change again. I believe I've described it good, but if You'll have a problem please let me know.
User avatar
Gold Boarder

teitbite
Tue Jan 08, 2013 5:06 pm
Hi

I cannot remember how many times I've been explaining how to make it :) Unfortunately it's not an easy process. Let try a new approach. Try with adding this to css:

Code: Select all
h2.catSub {
    height: 30px;
    overflow: visible;
    position: relative;
    z-index: 10;
}

.category-view .row .category .spacer h2 a {
    height: 155px;
}


It basicaly covers an image with the above link to category.
User avatar
Moderator

GK User
Tue Jan 08, 2013 6:50 pm
Thanks.

I think this behavior should be by default.

teitbite wrote:Hi

I cannot remember how many times I've been explaining how to make it :) Unfortunately it's not an easy process. Let try a new approach. Try with adding this to css:

Code: Select all
h2.catSub {
    height: 30px;
    overflow: visible;
    position: relative;
    z-index: 10;
}

.category-view .row .category .spacer h2 a {
    height: 155px;
}


It basicaly covers an image with the above link to category.
User avatar
Gold Boarder

teitbite
Tue Jan 08, 2013 11:50 pm
Hi

Unfortunately this code is not what I would call "clean solution". It's more of a trick to force linking. There is a lot of issues it may bring, but will suit well to Your website.
User avatar
Moderator


cron