Troubles in the default thumbnail

Posted by Community Admin on 05-Aug-2018 23:23

Troubles in the default thumbnail

All Replies

Posted by Community Admin on 29-May-2012 00:00

Hi, 

i'm making a custom product list the title and description works fine but the thumbnail image is always the same on:

product.ThumbnailUrl
and 
product.PrimaryImageUrl
=
/SFRes/images/Telerik.Sitefinity.Resources/Images.DefaultProductTmb.png


and this is how i get the products:


CatalogManager catalogManager = CatalogManager.GetManager();
IList<Product> products = catalogManager.GetProducts().ToList();

Regards.

Posted by Community Admin on 01-Jun-2012 00:00

Hello,

I have answered you in the support ticket.

Here is a code sample of how to retrieve the product thumbnail url.

// Get a Catalog Manager
            CatalogManager catalogManager = CatalogManager.GetManager();
  
            var products = catalogManager.GetProducts().Where(p => p.Title == "red wine").ToList();
  
            //Create a new ProductImagepopulater
            var productImagePopulator = new ProductImagePopulator();
            productImagePopulator.PopulateImages(products);
  
            //Loop through the proudcts and get the product thumbnail
            foreach (Product product in products)
            
                var productThumbnailUrl = product.ThumbnailUrl;
            
All the best,
Grace Hallwachs
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 01-Jun-2012 00:00

Hi, Grace Hallwachs

Thanks, it works!

Best Regards.

This thread is closed