Product page with multiple images

Questions and answers about ShopSite Custom Templates

Product page with multiple images

Postby wolfytooth » Sat Dec 11, 2010 3:53 pm

I am trying to create a product page that contains thumbnails of products. When the user rolls over a thumbnail, a larger version of the product is displayed on the page. Is there anyway to do this?

I can assign multiple images to a more info page, but I am not sure how to do this for a product page.

Any thoughts or suggestions?
wolfytooth
 
Posts: 4
Joined: Sun Jul 25, 2010 8:45 pm
Location: USA

Re: Product page with multiple images

Postby Jim » Mon Dec 13, 2010 3:35 pm

By "product page" I assume you mean a store page with multiple products on it?

You can include additional image in text fields such as the product description by including the url to the image, for example.
<img src="http://yourdomain.com/media/imagename.gif" alt="alt text for image" >

If your version of ShopSite has extra product field you could also use those to contain images. However, to use the extra product fields you need to have a custom template that includes the code to display those fields. Your template could contain something like this to generate the links
Assuming that extra product field1 contains just the image name like image.gif or image.jpg and extra product field 2 contains the alt text for the image.
<img src="[-- Store.output_url --]/media/[-- product.field1 --]" alt="[-- product.field2 --]>
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Product page with multiple images

Postby wolfytooth » Sun Dec 19, 2010 7:44 pm

Thanks Jim. That was helpful advice. The idea of adding image tags to the custom field is a nice tool for me to use. Unfortunately, this may be overwhelming to my end user.

My solution ended up being that the designers of the page are only going to use square images. Therefore, I can just uses sizes on the img tag and the thumbnails look fine. I just use some javascript to handle the rollovers and displaying the larger image based upon the record id.

I do have a followup question, is record id the unique identifier of the products in the database?
wolfytooth
 
Posts: 4
Joined: Sun Jul 25, 2010 8:45 pm
Location: USA

Re: Product page with multiple images

Postby Jim » Mon Dec 20, 2010 10:17 am

The tag [-- PRODUCT.RecordNumber --] will give the internal database record number for the product. As long as a product is not deleted from the database that record number will be used for it. If you were to download all your products , delete all products in the store and re-upload the products again there is a good chance that the product would have a different record number.

You cannot use the record ID to assign a certain product to a certain record number since the order of records in the database is handled by the database.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 108 guests