+1-888-365-2779
Try Now
More in this section

Forums / Ecommerce / Troubles in the default thumbnail

Troubles in the default thumbnail

3 posts, 1 answered
  1. Desiderio
    Desiderio avatar
    21 posts
    Registered:
    26 Apr 2012
    29 May 2012
    Link to this post
    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.
  2. Grace Hallwachs
    Grace Hallwachs avatar
    144 posts
    Registered:
    03 Nov 2014
    01 Jun 2012
    Link to this post
    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
    Answered
  3. Desiderio
    Desiderio avatar
    21 posts
    Registered:
    26 Apr 2012
    01 Jun 2012
    Link to this post
    Hi, Grace Hallwachs

    Thanks, it works!

    Best Regards.
3 posts, 1 answered