Thursday, July 19, 2012

Gold Cart Thumbnail Gallery Link not Working

If you find one day that your Gold Cart Thumbnail gallery images are not click-able, this post may help you! I was using the following in my wp-ecommerce wpsc-single-product.php page, to display small thumbnail images below the large, main image, these are supposed to be click-able and should open up the big gallery image when clicked, depending on your setting for the main image i should add.

if ( function_exists( 'gold_shpcrt_display_gallery' ) )
 echo gold_shpcrt_display_gallery( wpsc_the_product_id() );

I am not sure at what point the image links were not working..I had modified the code from just changing out the main image to opening the gallery maybe that broke it or it was always broke.. Anyhow, in using Firebug I could tell the anchor/image link was set up but just not working right, of course, after much research I finally came across this post: http://www.sitekickr.com/blog/wp-e-commerce-gold-cart-product-gallery-lightbox/ that suggested I do this:

if ( function_exists( 'gold_shpcrt_display_gallery' ) )
 echo str_replace('attachment-gold-thumbnails', '',  gold_shpcrt_display_gallery(wpsc_the_product_id() ));
Which was removing the 'attachment-gold-thumbnails' from the output. 'Cause it was getting in the way! And that worked out perfect!

No comments:

Post a Comment