Troubles in the default thumbnail - Ecommerce - Ecommerce - Progress Community

Troubles in the default thumbnail

 Ecommerce

Troubles in the default thumbnail

  • Troubles in the default thumbnail
  • 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.
  • 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
  • Hi, Grace Hallwachs

    Thanks, it works!

    Best Regards.