Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Minor fix

support1568335610e8
diff --git a/src/Web/Grand.Web/Views/PdfTemplates/OrderPdfTemplate.cshtml b/src/Web/Grand.Web/Views/PdfTemplates/OrderPdfTemplate.cshtml
index d121d76d8..93230dd46 100644
--- a/src/Web/Grand.Web/Views/PdfTemplates/OrderPdfTemplate.cshtml
+++ b/src/Web/Grand.Web/Views/PdfTemplates/OrderPdfTemplate.cshtml
@@ -55,13 +55,16 @@
@foreach (var order in Model.Item1)
{
var store = await _storeService.GetStoreById(order.StoreId);
- var url = logoExists ? await _pictureService.GetPictureUrl(logoPicture, 0, false, store.Url) : "";
if (!string.IsNullOrEmpty(_pdfSettings.InvoiceHeaderText))
{
<div>@_pdfSettings.InvoiceHeaderText</div>
}
<h2>@store.CompanyName</h2>
- <div><img src="@(logoExists ? url:"")" alt="logo" title="logo" /></div>
+ if (logoExists)
+ {
+ var url = await _pictureService.GetPictureUrl(logoPicture, 0, false, store.Url);
+ <div><img src="@url" alt="logo" title="logo" /></div>
+ }
<h3>@(string.Format(_translationService.GetResource("PDFInvoice.Order#", order.CustomerLanguageId), order.OrderNumber))</h3>
<table>
<tr>