public virtual async Task<IEnumerable<ProductOverviewModel>> PrepareProductOverviewModelsAsync(IEnumerable<Product> products,
bool preparePriceModel = true, bool preparePictureModel = true,
int? productThumbPictureSize = null, bool prepareSpecificationAttributes = false,
bool forceRedirectionAfterAddingToCart = false)
{
if (products == null)
throw new ArgumentNullException(nameof(products));
var models = new List<ProductOverviewModel>();
// GET QUERY STRING HERE
foreach (var product in products)
{
var model = new ProductOverviewModel
{
Id = product.Id,
Name = await _localizationService.GetLocalizedAsync(product, x => x.Name),
ShortDescription = await _localizationService.GetLocalizedAsync(product, x => x.ShortDescription),
FullDescription = await _localizationService.GetLocalizedAsync(product, x => x.FullDescription),
SeName = await _urlRecordService.GetSeNameAsync(product),
Sku = product.Sku,
ProductType = product.ProductType,
Image1 = product.Image1,
Image2=product.Image2,
Image3=product.Image3,
MarkAsNew = product.MarkAsNew &&
(!product.MarkAsNewStartDateTimeUtc.HasValue || product.MarkAsNewStartDateTimeUtc.Value < DateTime.UtcNow) &&
(!product.MarkAsNewEndDateTimeUtc.HasValue || product.MarkAsNewEndDateTimeUtc.Value > DateTime.UtcNow)
};
}
But this :
System.Web.HttpContext.Current.Request.QueryString["yourstring"]
Does not work how to get querystring here?