Browse Source
Merge pull request #98 from abpframework/12062-Cart-Missed-Image
Show the image on the cart correctly
pull/99/head
Galip Tolga Erdem
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Toolbar/Cart/Default.cshtml
|
|
|
@ -1,7 +1,11 @@ |
|
|
|
@using EShopOnAbp.Localization |
|
|
|
@using Microsoft.AspNetCore.Mvc.Localization |
|
|
|
@using Microsoft.Extensions.Options |
|
|
|
@using Volo.Abp.Http.Client |
|
|
|
@inject IHtmlLocalizer<EShopOnAbpResource> L |
|
|
|
@model EShopOnAbp.BasketService.Services.BasketDto |
|
|
|
@inject IOptions<AbpRemoteServiceOptions> options |
|
|
|
|
|
|
|
<div id="shopping-cart" class="nav-link"> |
|
|
|
|
|
|
|
@if (Model == null) |
|
|
|
@ -34,7 +38,7 @@ |
|
|
|
{ |
|
|
|
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="dropdown-item"> |
|
|
|
|
|
|
|
|