Category listings
// Below is an example of a request - response cycle of a category listing request
var request = new GetEntitiesByAttributeRequest("Category", categoryName);
request.ResultsOptions.Skip = 0;
request.ResultsOptions.Take = 9;
var response = _loop54Client.GetEntitiesByAttribute(request);
var results = response.Results.Items;
if (!results.Any())
Debug.WriteLine("There were no items in this category.");
foreach (var resultItem in results)
{
var productId = resultItem.GetAttributeValueOrDefault<string>("Id");
var productTitle = resultItem.GetAttributeValueOrDefault<string>("Title");
Debug.WriteLine(productId + " " + productTitle);
//render a product on the category listing page
}Last updated
Was this helpful?

