Designating "ss_size3" image in a custom template

General ShopSite user discussion

Designating "ss_size3" image in a custom template

Postby VinceS » Thu Dec 16, 2010 2:49 pm

How can I stipulate the use of the ss_size3 image in my template?

My sub-products are listed in a table layout on the Product More Information Page and I'd like to have the sub-product image appear.

I want this line in the Define Sub Product section of the Product template
<td><img border="0" [-- PRODUCT.Graphic Remove_HTML --] alt="[-- PRODUCT.Name --]"><td>

to produce this line on the generated Product More Information Page
<td><img border="0" src="http://www.ahoycaptain.com/shop/media/nauta/ss_size3/FTP2221.jpg" alt="WIDGET"></td>

I can't hard code the media file path because it is not static. It changes depending on the product.


Go to http://www.ahoycaptain.com/shop/winchrite_wr1.html
Scroll to the bottom to see the Options and Accessories table of sub-products
I want to add a column with an extra small image (ss_size3) as the first column
VinceS
 
Posts: 134
Joined: Fri Apr 06, 2007 1:26 pm

Re: Designating "ss_size3" image in a custom template

Postby ShopSite Lauren » Thu Jan 20, 2011 10:01 am

Currently, the only way to do this with subproducts is if all of your product images are in the media directory, not in a subdirectory of the media directory. If they are all in the media folder (in your example they are not, so I am not sure if you want to go this route or not). Then you could use the following code in your template:

<img src="[-- OUTPUT_DIRECTORY_URL --]/media/ss_size3/[-- IMAGE PRODUCT.Graphic --]" border="0">

Another option, if you would like to continue having your images in different subfolders within your media folder, and if you don't mind manipulating your current product data in Excel, and adding one extra set for future products, you could do the following.
1. If your product image is the media folder, you do not need to do another step.
2. If your product is not in the media folder, then you would need to list the folder (or folders) that it is in, in one of the extra product fields (you can quickly do this in Excel by taking the product graphic field, and doing a "Text To Columns," with the delimiter being a "/"). So for example, with your product image example below, you would add "nauta" in the product field 1.
3. Then the code in your template would look like the following:

<img src="[-- OUTPUT_DIRECTORY_URL --]/media/[-- IF PRODUCT.Field1 --][-- PRODUCT.Field1 --]/[-- END_IF --]ss_size3/[-- IMAGE PRODUCT.Graphic --]" border="0">

The third thing that you could do, is switch from using the subproduct feature, to using the per product cross sell feature. The cross sell feature allows you to specify the size image to use for all cross sell products. This option would be a lot of work to setup initially.
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT


Return to User Forum

Who is online

Users browsing this forum: No registered users and 35 guests