diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Pages/Index.cshtml.cs b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Pages/Index.cshtml.cs index c6d2443a..b796c5a8 100644 --- a/samples/EShopSample/aspnet-core/src/EShopSample.Web/Pages/Index.cshtml.cs +++ b/samples/EShopSample/aspnet-core/src/EShopSample.Web/Pages/Index.cshtml.cs @@ -57,12 +57,12 @@ public class IndexModel : EShopSamplePageModel Sorting = "CreationTime DESC" }); - Order = OrderList.Items.FirstOrDefault(x => x.OrderStatus is OrderStatus.Pending); - Store = await _storeAppService.GetDefaultAsync(); CakeProduct = await _productAppService.GetByUniqueNameAsync(Store.Id, SampleDataConsts.CakeProductUniqueName); + Order = OrderList.Items.FirstOrDefault(x => x.OrderStatus is OrderStatus.Pending && x.OrderLines.Any(ol => ol.ProductId == CakeProduct.Id)); + Wallet = (await _accountAppService.GetListAsync(new GetAccountListInput { UserId = CurrentUser.Id })).Items[0]; } @@ -90,7 +90,7 @@ public class IndexModel : EShopSamplePageModel sb.Append(','); } } - + sb.Append('}'); sb.Append($",\"skuId\":\"{sku.Id}\"");