Thumbnails in List on Combo Page

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 2, 2012   (RSS)

By SkidderChains - August 1, 2012

I have created a product Combo Page, and would like to have a thumbnail of the product displayed in the product list.

I have tried using the following code, but it renders and error/invalid arguement....
"Notice: Undefined index: image in /home/content/43/9447743/html/v8/ForestryProducts.php on line 166 Warning: Invalid argument supplied for foreach() in /home/content/43/9447743/html/v8/ForestryProducts.php on line 166 "

<!--THUMBNAIL-->

<?php foreach ($listRecords['image'] as $index => $upload): ?>
<a href="<?php echo $listRecord['_link'] ?>"><img style="border:1px solid #b2d3c7;" src="<?php echo $upload['thumbUrlPath3'] ?>" border="0"/></a>
<?php endforeach ?>

<!-- END THUMBNAIL-->

What should I be using to display the thumbnails?

Re: [SkidderChains] Thumbnails in List on Combo Page

By Jason - August 1, 2012

Hi,

Your thumbnail code is correct. The issue here is with the index "image". The one thing I noticed is that in your foreach loop you use $listRecords, but when outputting your link, you use $listRecord.

My guess is that you need to change your foreach loop to remove the "s"

ie

<?php foreach ($listRecord['image'] as $index => $upload): ?>

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/