I wanted to customize e-commerce product default view.
One of the aspect was to list all the gallery images on the page.
See the following PHP code to get this information from DataBase.
$post_id = wpsc_the_product_id(); $query = mysql_query("select wp.guid, wpm.meta_key, wpm.meta_value FROM wp_posts wp INNER JOIN wp_postmeta wpm ON wp.ID = wpm.post_id WHERE wp.post_parent = $post_id AND wp.post_type = 'attachment' AND wp.post_mime_type LIKE 'image%' AND wpm.meta_key = '_wp_attached_file' "); $i=0; while ($slide = mysql_fetch_array($query)): $i++; ?>endwhile; ?>
This will show the list of clickable thumbnails.
Note: this method works for e-Commerce v. 3.8.7.4