getItemMultimediaThumbnail
Method Signature | ItemMultimediaThumbnail getItemMultimediaThumbnail(Item item, ItemMultimedia itemMultimedia, int width, int height); |
Description | Creates a thumbnail of the specified width and height for the given multimedia object. |
Parameters | Item: The item that the multimedia object is associated with. ItemMultimedia – The multimedia object that you want a thumbnail of. width – the width of the thumbnail height – the height of the thumbnail |
Result | If the system is able to create the thumbnail in real-time it will return a ItemMultimediaThumbnail object. This method can return null if the system is unable to create the thumbnail in real-time or the thumbnail is not ready from a background creation. |
Â
Â
// try this for merchant id 'DEMO' var item = ultraCart.getItem('BONE'); if(item.multimedias){ for(var i = 0; i < item.multimedias.length; i++){ var thumbnail = ultraCart.getItemMultimediaThumbnail(item, item.multimedias[i], 80, 80); console.log(thumbnail); } }