Displaying different size of the product's image

General ShopSite user discussion

Displaying different size of the product's image

Postby azrac » Mon Jun 25, 2012 5:13 pm

I have created several products. In the Product Information (Edit Product Info) I have assigned the image to this product and selected the Product Image Size to be Medium.
This is great... as I need this size on one page. On another page I need to use the same picture but in the small size. How do I do this?

Thank you.
azrac
 
Posts: 45
Joined: Wed May 30, 2012 6:50 pm

Re: Displaying different size of the product's image

Postby Jim » Tue Jun 26, 2012 6:06 am

You can assign an image to be the Product Image or a Product's moreinfo image. Each of those can have the size specified. In addition you can have extra product moreinfo images and you can set a size for those. These are all done on the Product > Edit product info screen. You can also define a size box for the product more info image, which is done on the Preferences > Moreinfo pages.

If you are not using the image as the main product image or the Moreinfo image or an extra moreinfo image there is no specific way to specify the size that the image will be displayed using the normal ShopSite template tags. However, you can construct the url for the image and the size that you want it to be in several ways.
1. You can use a larger version of the product image and using css or html force the size of the image to be the size you want it to be. This is not generally the best way to do it because the full size image must be loaded and then resized on the viewers screen to the smaller size.
2. You can hard code the image url to the smaller image into a text field that will be displayed where you want the image.
3. You can use the [-- image product.graphic --] tag to get just the image name and build the full url using other template tags and specify the ss_sizeX directory to get the specific image size you need. Note that this will only work if the image is in the media directory itself and not in a sub directory because the [-- image product.graphic --] tag returns the full path to the image includeing any sub directories and there is no way to insert the ss_sizeX directory into that path, but if it is in the media directory then no path is specified so you can use something like [-- store.output_url --]/media/ss_size1/[--image product.graphic --]
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Displaying different size of the product's image

Postby azrac » Tue Jun 26, 2012 4:37 pm

Hi Jim,

I was thinking that option 3 would be the best, but after some thought... maybe not. Let me explain what I am trying to do.I have 2 pages. One called SHOP where you shop for all the products. On this page my products use medium image size and they all have more info page.
Second page is called DESIGNERS and there I have some designer info and underneath products of the designer. On this page I want the same products as on the SHOP page but with the small picture.
Basically there are 2 same pictures of different size, but they need to be associated with the same product.
Please advise.

Thank you.
azrac
 
Posts: 45
Joined: Wed May 30, 2012 6:50 pm


Return to User Forum

Who is online

Users browsing this forum: No registered users and 91 guests