Miva Merchant Development by Scot's Scripts

IMAGEMACHINE: Add classes to image machine images

Miva Knowledge Base
IMAGEMACHINE: Add classes to image machine images
Important Notice: This information is for internal reference only. Use at your own risk.
Does Google actually understand your Miva Merchant store? Our JSON-LD schema generator makes sure it does. Contact us to get started. (more info)

IMAGEMACHINE: Add classes to image machine images

Scot Ranney • December 19, 2023


<script>
ImageMachine.prototype.ImageMachine_Generate_Thumbnail = function( thumbnail_image, main_image, closeup_image, type_code )
{
	var thumbnail, span, img;
	thumbnail	= document.createElement( 'li' );
	thumbnail.className = "list-inline-item";
	span		= document.createElement( 'span' ); // to vertically center the thumbnail images
	thumbnail.appendChild( span );
	if ( typeof( thumbnail_image ) == 'string' && thumbnail_image.length > 0 )
	{
		img		= document.createElement( 'img' );
		img.src	= thumbnail_image;
		img.className = "img-thumbnail";
		thumbnail.appendChild( img );
	}
	return thumbnail;
}
</script>

https://www.scotsscripts.com/mvblog/imagemachine-add-classes-to-image-machine-images.html

mvkb_imagemachine