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.

shopping cart quantity - minor changes

DanielŻuławski5d12a066f5b9
diff --git a/src/Web/Grand.Web/Views/Shared/_ShoppingCartLinks.cshtml b/src/Web/Grand.Web/Views/Shared/_ShoppingCartLinks.cshtml
index 6cf0549d4..77d9a36ff 100644
--- a/src/Web/Grand.Web/Views/Shared/_ShoppingCartLinks.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/_ShoppingCartLinks.cshtml
@@ -57,7 +57,14 @@
<li class="nav-item">
<a href="@Url.RouteUrl("ShoppingCart")" class="nav-link">
<b-icon icon="cart" :variant="[darkMode ? 'white' : 'dark']"></b-icon>
- <div class="qty-indicator cart-qty">@Loc["ShoppingCart.HeaderQuantity", shoppingCartItems]</div>
+ <span class="qty-indicator cart-qty">
+ <template v-if="flycartindicator == null">
+ @Loc["ShoppingCart.HeaderQuantity", shoppingCartItems]
+ </template>
+ <template v-else>
+ {{flycartindicator}}
+ </template>
+ </span>
</a>
</li>
}
diff --git a/src/Web/Grand.Web/wwwroot/theme/script/public.axios.js b/src/Web/Grand.Web/wwwroot/theme/script/public.axios.js
index b9e5a564c..107473c72 100644
--- a/src/Web/Grand.Web/wwwroot/theme/script/public.axios.js
+++ b/src/Web/Grand.Web/wwwroot/theme/script/public.axios.js
@@ -179,6 +179,9 @@ var AxiosCart = {
vm.flycartindicator = newfly.TotalProducts;
}
+ if (response.data.updatetopcartsectionhtml !== 'undefiend') {
+ vm.flycartindicator = response.data.updatetopcartsectionhtml;
+ }
if (response.data.product) {
if (response.data.success == true) {