Browse Source
Merge pull request #99 from abpframework/Missed-Images
Fixed the missed images on order and basket
pull/100/head
Galip Tolga Erdem
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
12 additions and
4 deletions
-
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Basket/Default.cshtml
-
apps/public-web/src/EShopOnAbp.PublicWeb/Components/UserOrders/Default.cshtml
|
|
|
@ -1,8 +1,11 @@ |
|
|
|
@using EShopOnAbp.Localization |
|
|
|
@using EShopOnAbp.PublicWeb.Components.Purchase |
|
|
|
@using Microsoft.Extensions.Localization |
|
|
|
@using Microsoft.Extensions.Options |
|
|
|
@using Volo.Abp.Http.Client |
|
|
|
@model EShopOnAbp.BasketService.Services.BasketDto |
|
|
|
@inject IStringLocalizer<EShopOnAbpResource> L |
|
|
|
@inject IOptions<AbpRemoteServiceOptions> options |
|
|
|
|
|
|
|
<div> |
|
|
|
@if (!Model.Items.Any()) |
|
|
|
@ -31,7 +34,7 @@ |
|
|
|
<div class="basket-list flex-container vertical"> |
|
|
|
@foreach (var item in Model.Items) |
|
|
|
{ |
|
|
|
string imageName = item.ImageName.IsNullOrEmpty() ? "/product-images/noimage.jpg" : $"/product-images/{item.ImageName}"; |
|
|
|
string imageName = item.ImageName.IsNullOrEmpty() ? $"{options.Value.RemoteServices.Default.BaseUrl}product-images/noimage.jpg" : $"{options.Value.RemoteServices.Default.BaseUrl}product-images/{item.ImageName}"; |
|
|
|
var price = item.TotalPrice.ToString("0.00"); |
|
|
|
<div class="card basket-list-item" data-product-id="@item.ProductId"> |
|
|
|
<div class="card-body"> |
|
|
|
|
|
|
|
@ -1,9 +1,11 @@ |
|
|
|
@using System.Globalization |
|
|
|
@using EShopOnAbp.Localization |
|
|
|
@using Microsoft.Extensions.Localization |
|
|
|
@using Microsoft.Extensions.Options |
|
|
|
@using Volo.Abp.Http.Client |
|
|
|
@model EShopOnAbp.PublicWeb.Components.UserOrders.UserOrderWidgetViewComponent.UserOrderViewModel |
|
|
|
@inject IStringLocalizer<EShopOnAbpResource> L |
|
|
|
|
|
|
|
@inject IOptions<AbpRemoteServiceOptions> options |
|
|
|
@if (Model.ServiceError) |
|
|
|
{ |
|
|
|
<div>SERVICE ERROR</div> |
|
|
|
@ -49,7 +51,10 @@ |
|
|
|
</div> |
|
|
|
<abp-row> |
|
|
|
<abp-column size="_2"> |
|
|
|
<img class="img-size" src="/product-images/@item.PictureUrl"/> |
|
|
|
@{ |
|
|
|
string imageUrl = $"{options.Value.RemoteServices.Default.BaseUrl}product-images/{item.PictureUrl}"; |
|
|
|
<img class="img-size" src="@imageUrl" /> |
|
|
|
} |
|
|
|
</abp-column> |
|
|
|
<abp-column size-lg="_4"> |
|
|
|
<div><strong>@item.ProductName</strong></div> |
|
|
|
@ -72,5 +77,5 @@ |
|
|
|
} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<hr/> |
|
|
|
<hr /> |
|
|
|
} |