Here is an easy way to add multiple images
Posted: Sun Dec 16, 2007 2:53 am
After much headbanging and unwillingness to really did into the code, I finally figured out how to EASILY have multiple images
1. Edit database to allow input of more images. Add new fields to the product table as 'product_image_01' 'product_image_02' etc using the same values as 'product_image' until you have the max number of images you want to add to each product. (Interestingly it works without adding additional image MIME type rows. I don't know enough to address that or if they truly should be created.)
2. Edit the file tables/products/fields.ini file to add near the top of the file:
[product_image_01]
Type=container
allowed_extensions="jpg,gif,png"
visibility:list = hidden
visibility:list = hidden
[product_image_02]
Type=container
allowed_extensions="jpg,gif,png"
visibility:list = hidden
visibility:list = hidden
Repeat until you match the number of images you want.
3. Edit this same file in tables/products/fields.ini file to add near the BOTTOM of the file:
[product_image_mimetype_01]
visibility:list = hidden
[product_image_mimetype_02]
visibility:list = hidden
etc
4. Edit the file in templates/view_product.html template file to display these additional images. Because the forum is eating code, you'll have to stretch a little to accomplish this step.
Locate and copy/paste line that starts the image display and repeat as necessary:
1. Edit database to allow input of more images. Add new fields to the product table as 'product_image_01' 'product_image_02' etc using the same values as 'product_image' until you have the max number of images you want to add to each product. (Interestingly it works without adding additional image MIME type rows. I don't know enough to address that or if they truly should be created.)
2. Edit the file tables/products/fields.ini file to add near the top of the file:
[product_image_01]
Type=container
allowed_extensions="jpg,gif,png"
visibility:list = hidden
visibility:list = hidden
[product_image_02]
Type=container
allowed_extensions="jpg,gif,png"
visibility:list = hidden
visibility:list = hidden
Repeat until you match the number of images you want.
3. Edit this same file in tables/products/fields.ini file to add near the BOTTOM of the file:
[product_image_mimetype_01]
visibility:list = hidden
[product_image_mimetype_02]
visibility:list = hidden
etc
4. Edit the file in templates/view_product.html template file to display these additional images. Because the forum is eating code, you'll have to stretch a little to accomplish this step.
Locate and copy/paste line that starts the image display and repeat as necessary: