Hi
I'm linking to products from an article based on an Item with product item fields (product type).
@foreach(string productID in products){ var product = Product.GetProductByID(productID); <a href="productlist?ProductID=@product.ID" title="@product.Name"> @if(!string.IsNullOrEmpty(product.ImageLarge)){ <span class="span2"> @product.ImageLarge </span> } </a> <h5> <a href="productlist?ProductID=@product.ID" title="@product.Name">@product.Name</a> </h5> }
where products is an array of product Id's
The problem is that I'm using the Alt. image functionality in my product catalog, which mean that the ImageLarge value is empty.
Does anybody know how I can show the images?
Also I would like to know why there is 'p_' before product id's and a ':' after the last product id in a list of attached products? Because of that I need to do the following:
string[] products = post.GetString("ItemPublisher:Item.Products").Replace("p_","").Replace(":","").Split(',');
to get the product id's into an array. Is there a better way to do this?
Regards Thomas