From 2148282b07d96b488b2c307694a791537db2526c Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 21 Jun 2023 09:47:47 +0300 Subject: [PATCH] Add schema.org Product and Offer properties --- Pages/Shared/_Products.cshtml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Pages/Shared/_Products.cshtml b/Pages/Shared/_Products.cshtml index eb38444..71e0238 100644 --- a/Pages/Shared/_Products.cshtml +++ b/Pages/Shared/_Products.cshtml @@ -16,7 +16,9 @@ @foreach (var product in products) {
-
+
+ + @{ var figure = product.Figures.First(); var filePath = $"/Content/{product.Id}/{figure.Id}.jpg"; @@ -24,7 +26,7 @@ } @product.Name + src="@thumbnailPath" alt="@product.Name" itemprop="image"/> @for (int i = 1; i < product.Figures.Count(); i++) { filePath = $"/Content/{product.Id}/{product.Figures[i].Id}.jpg"; @@ -32,9 +34,11 @@ data-caption="@product.Figures[i].Description"> }
-
-
@product.Name
- @String.Format(new CultureInfo("ru-RU"), "{0:C0}", product.Price) +
+
@product.Name
+ @String.Format(new CultureInfo("ru-RU"), "{0:C0}", product.Price) + +