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

single product page, image help.

Started by mrooks1984, June 29, 2012, 09:42:06 AM

Previous topic - Next topic

mrooks1984

hello all, not sure it this is posted in the correct forum.

i am hoping someone could please help me, on a single product page i am hoping to give images (the big image on each product) a size and then add a link to the full size image to open it, so if i upload a 2000x2000 image in the backend, it does a small image on the page and shows a big image, but just shows the full size of the image, instead of that i want it to down size the image by using the normal html image properties e.g. width="300px" etc.
if someone could tell me where the code for the large image is i would be greatfull and i try and do it myself, or let me know how to do it.

thanks all. 
Joomla and Virtuemart Website Designer

My Website:
http://www.cyberglide.co.uk

jenkinhill

Grab a copy of the view template file at joomla_root/components/com_virtuemart/views/productdetails/tmpl/default_images.php  The large image id is medium-image

Edit it as you wish and then use it as an override in your Joomla template.

Note that there is a change in VirtueMart 2.0.8 in the way that a single image is displayed.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

mrooks1984

ok thank you i will have a look, will that resize the image so it doesnt go under the add to basket button etc?
do you know how i would make it linkable so it opens a new window and shows the full image?
thanks again.
Joomla and Virtuemart Website Designer

My Website:
http://www.cyberglide.co.uk

jenkinhill

http://forum.virtuemart.net/index.php?topic=98647.0

The code to use facebox is already in the templates, just re-use it in the right place.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

papaavola

Hello,

I use following CSS code to make pictures smaller in product page, add this to end of your template.css and you have no more too big pictures.

/* VM 2.08 Product main-image resize */
div.main-image img {
max-width:250px;
max-height:250px;
width:auto;
height:auto;
}


This code sets size limits for picture and resize pictures in browser when needed.
This works with all browsers that I test.

If you want show it fullsized when clicked, you need to use code from jenkinhill message
Quote from: jenkinhill on June 30, 2012, 13:46:45 PM.
http://forum.virtuemart.net/index.php?topic=98647.0

The code to use facebox is already in the templates, just re-use it in the right place.

Or add another product picture and image gallery is added to page automaticly that shows pictures with fullsize when clicked including that main picture.

Vm 2.08 J! 2.56

mrooks1984

thanks guys, it works so far, the main issue i needed help with, was making the main product image a link like the thumbnails, so when thats clicked it loads up the full image just like clicking it on the thumbnail.
thanks again guys.
Joomla and Virtuemart Website Designer

My Website:
http://www.cyberglide.co.uk

vis18neu

I understand how to resize the image via css, I've done it in earlier VM versions, but I don't understand how to click on product image and enlarge it if you have only one product image in VM 2.0.8.