Browse Source

Applied the temporary solution

pull/135/head
malik masis 4 years ago
parent
commit
b2cf7ca89e
  1. 11
      apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs

11
apps/public-web/src/EShopOnAbp.PublicWeb/Pages/ProductDetail.cshtml.cs

@ -29,8 +29,17 @@ namespace EShopOnAbp.PublicWeb.Pages
public async Task OnGet(Guid id)
{
IsPurschased = (await _orderAppService.GetMyOrdersAsync(new GetMyOrdersInput())).Any(p => p.Items.Any(p => p.ProductId == id));
Product = await _productAppService.GetAsync(id);
try
{
IsPurschased = (await _orderAppService.GetMyOrdersAsync(new GetMyOrdersInput())).Any(p => p.Items.Any(p => p.ProductId == id));
}
catch (Exception e)
{
IsPurschased = false;
Console.WriteLine(e);
}
}
}
}
Loading…
Cancel
Save