Designating Images in a Template

General ShopSite user discussion

Designating Images in a Template

Postby VinceS » Mon Feb 18, 2008 6:32 pm

I want to place the Extra Small sized image in the sub-products listings on the more information page. How do I specify the ss_size3 version of the image in a template?
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Postby loren_d_c » Tue Feb 19, 2008 10:09 am

You don't specify the image size in the template, it has to be specified via the size pull-down setting associated with that image. In the template you would just use the normal [-- PRODUCT.Graphic --] tag in your subproduct define and if the 3rd size is the one you specified in the subproduct's settings, then the ss_size3 directroy will automatically be inserted in the resulting image URL.

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Designating Images in a Template

Postby VinceS » Tue Feb 19, 2008 10:36 am

No not quite that easy. I have three different instances of where the product can be displayed and three different sizes I'd like it displayed in.

The PRODUCT.Graphic tag is set to Small for when the product is displayed on a page with other other product links and page links.

The PRODUCT.MoreInformationGraphic tag is set to Original.

But if that same product is displayed as a subproduct, I'd like the image to be Extra Small in the sub-product list.

Here's a link that might get my point across better
http://www.ahoycaptain.com/shop/henri-lloyd_Y50060.html
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Postby loren_d_c » Tue Feb 19, 2008 11:00 am

If your original image is in the root of the 'media' directory (not in a subdirectory of 'media'), then you could create the image URL using the size directory and the IMAGE tag, for example http://www.yourdomain.com/media/ss_size3/[--IMAGE PRODUCT.Graphic --]

However if your image is in a subdirectory, this won't work because the results of the IMAGE tag will return the subdirectory and the image filename with no way to insert the size directory between them.

One thing you could consider is upgrading to the current v9.0 version and using the Cross-sell feature (cross-selling is really what you are doing in this scenario, anyway) on your More Info Pages instead of using the subproducts feature. The settings for the Cross-sell feature include a setting to use one of the image sizes for all cross-sell product images, so you could select a different size than is set for your regular product images. Note that the only v9.0 default theme that currently uses Cross-sell on the More Info Pages is the new Modern theme so you could copy that theme's product template for an example of the new DEFINE section and cross-sell loop that is required in your product template to use the product's Cross-sell on the More Info Pages.

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere


Return to User Forum

Who is online

Users browsing this forum: No registered users and 146 guests