Troubleshoot: Images Not Changing In The Gem Theme

If you are using WooCommerce Product Configurator and The Gem theme, you may have noticed that the images do not change when you select your product options.

In order to resolve that, we need to remove the default images and replace them with the configurator images.

Place the following snippet in your child theme’s functions.php file, or use the Code Snippets plugin.

function iconic_configurator_thegem() {
    global $jckpc, $post;
  
    $configurator = get_post_meta( $post->ID, 'jckpc_enabled', true );
  
    if( $configurator !== "yes" ) {
	    return;
    }
  
    remove_action( 'thegem_woocommerce_single_product_left', 'thegem_woocommerce_single_product_gallery', 5 );
    add_action( 'thegem_woocommerce_single_product_left', array( $jckpc, 'display_product_image' ), 5 );
}

add_action( 'wp', 'iconic_configurator_thegem' );

Once you’ve done that, you will want to set your image width to 100% and change the layout to “None”.

Change width of image change display to none

WooCommerce Product Configurator

Use transparent image layers for your variable products, removing the need to create hundreds of final product variation images.

Was this helpful?

Please let us know if this article was useful. It is the best way to ensure our documentation is as helpful as possible.