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.

Replace <b-tags> - PopupAddToCart

DanielŻuławski766ffcc7014a
diff --git a/src/Web/Grand.Web/Views/Shared/_PopupAddToCart.cshtml b/src/Web/Grand.Web/Views/Shared/_PopupAddToCart.cshtml
index 48e60be28..b241593f4 100644
--- a/src/Web/Grand.Web/Views/Shared/_PopupAddToCart.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/_PopupAddToCart.cshtml
@@ -15,9 +15,9 @@
}
}
<b-modal ref="ModalAddToCart" id="ModalAddToCart" :dark-theme="darkMode" body-class="p-0" size="lg" @@shown="onShown" centered hide-footer hide-header>
- <b-button class="modal-close" block @@click="$bvModal.hide('ModalAddToCart')"><b-icon icon="x" variant="white"></b-icon></b-button>
- <b-card header-tag="header" footer-tag="footer" header-bg-variant="info" footer-bg-variant="white" footer-class="border-0">
- <template v-slot:header>
+ <button class="modal-close btn text-white" @@click="$bvModal.hide('ModalAddToCart')"><b-icon icon="x"></b-icon></button>
+ <div class="card" header-tag="header" footer-tag="footer" header-bg-variant="info" footer-bg-variant="white" footer-class="border-0">
+ <div class="card-header bg-info">
<h5 class="mb-0 text-white">
@if (Model.CartType == ShoppingCartType.ShoppingCart || Model.CartType == ShoppingCartType.OnHoldCart)
{
@@ -32,132 +32,134 @@
@Loc["shoppingcart.yourbidhasbeenplaced"]
}
</h5>
- </template>
- <b-col cols="12" class="px-0">
- <b-form-row>
- <b-col xl="2" lg="3" cols="4" class="d-sm-block d-none">
- <b-card-img-lazy src="@Model.Picture.ImageUrl" alt="@Model.Picture.AlternateText" title="@Model.Picture.Title"></b-card-img-lazy>
- </b-col>
- <b-col>
- <b-link href="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })"><h4>@Model.ProductName</h4></b-link>
- @if (!string.IsNullOrEmpty(Model.AttributeDescription))
- {
- <div class="form-group col-12 px-0 d-none d-md-block my-2">
- <label class="w-100 mb-0"><strong>@Loc["AddToCart.Attributes"]</strong></label>
- <div class="attributes p-2">
- @Html.Raw(Model.AttributeDescription)
+ </div>
+ <div class="card-body">
+ <div class="col-12 px-0">
+ <div class="form-row">
+ <div class="d-sm-block d-none p-2">
+ <img src="@Model.Picture.ImageUrl" alt="@Model.Picture.AlternateText" title="@Model.Picture.Title" />
+ </div>
+ <div>
+ <a href="@Url.RouteUrl("Product", new { SeName = Model.ProductSeName })"><h4>@Model.ProductName</h4></a>
+ @if (!string.IsNullOrEmpty(Model.AttributeDescription))
+ {
+ <div class="form-group col-12 px-0 d-none d-md-block my-2">
+ <label class="w-100 mb-0"><strong>@Loc["AddToCart.Attributes"]</strong></label>
+ <div class="attributes p-2">
+ @Html.Raw(Model.AttributeDescription)
+ </div>
</div>
- </div>
- }
- @if (!string.IsNullOrEmpty(Model.ReservationInfo))
- {
- <div class="form-group col-12 px-0 d-none d-md-block">
- <label class="w-100"><strong>@Loc["AddToCart.ReservationInfo"]</strong></label>
- <div class="attributes p-2">
- @Html.Raw(Model.ReservationInfo)
+ }
+ @if (!string.IsNullOrEmpty(Model.ReservationInfo))
+ {
+ <div class="form-group col-12 px-0 d-none d-md-block">
+ <label class="w-100"><strong>@Loc["AddToCart.ReservationInfo"]</strong></label>
+ <div class="attributes p-2">
+ @Html.Raw(Model.ReservationInfo)
+ </div>
</div>
- </div>
- }
- @if (!Model.IsAuction)
- {
- <div class="form-group col-12 pl-0 mb-0 d-flex">
- <label class="mb-0"><strong>@Loc["AddToCart.Qty"]</strong></label>
- <label class="pl-3 mb-0">@Model.Quantity</label>
- </div>
- }
- else
- {
- <div class="form-group col-12 pl-0 mb-0 d-flex">
- @if (Model.EndTime.HasValue)
- {
- <div>
- @if (Model.EndTime > DateTime.UtcNow)
- {
- <countdown :end-time="@Model.EndTime.Value.ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds">
- <template v-slot:process="{ timeObj }">
- <span class="col-form-label">@Loc["AddToCart.Timeleft"]:</span>
- <span>{{ `${timeObj.d}` }} </span>
- <span>: {{ `${timeObj.h}` }} </span>
- <span>: {{ `${timeObj.m}` }} </span>
- <span>: {{ `${timeObj.s}` }}</span>
- </template>
- <template v-slot:finish>
- <span>@Loc["ShoppingCart.Auctionends"]</span>
- </template>
- </countdown>
- }
- else
- {
- <label>@Loc["ShoppingCart.Auctionends"]: @Model.EndTime.Value.ToString()</label>
- }
- </div>
- }
- </div>
- }
-
- <div class="form-group col-12 pl-0 mb-1 d-flex">
- @if (Model.IsAuction)
+ }
+ @if (!Model.IsAuction)
{
- <label class=""><strong>@Loc["AddToCart.Yourbid"]:</strong></label>
- <label class="pl-3 mb-0">@Model.HighestBid</label>
+ <div class="form-group col-12 pl-0 mb-0 d-flex">
+ <label class="mb-0"><strong>@Loc["AddToCart.Qty"]</strong></label>
+ <label class="pl-3 mb-0">@Model.Quantity</label>
+ </div>
}
else
{
- <label class=""><strong>@Loc["AddToCart.Price"]</strong></label>
- <label class="pl-3 mb-0">@Model.Price</label>
+ <div class="form-group col-12 pl-0 mb-0 d-flex">
+ @if (Model.EndTime.HasValue)
+ {
+ <div>
+ @if (Model.EndTime > DateTime.UtcNow)
+ {
+ <countdown :end-time="@Model.EndTime.Value.ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds">
+ <template v-slot:process="{ timeObj }">
+ <span class="col-form-label">@Loc["AddToCart.Timeleft"]:</span>
+ <span>{{ `${timeObj.d}` }} </span>
+ <span>: {{ `${timeObj.h}` }} </span>
+ <span>: {{ `${timeObj.m}` }} </span>
+ <span>: {{ `${timeObj.s}` }}</span>
+ </template>
+ <template v-slot:finish>
+ <span>@Loc["ShoppingCart.Auctionends"]</span>
+ </template>
+ </countdown>
+ }
+ else
+ {
+ <label>@Loc["ShoppingCart.Auctionends"]: @Model.EndTime.Value.ToString()</label>
+ }
+ </div>
+ }
+ </div>
}
- </div>
- </b-col>
- <b-col cols="12">
- <b-jumbotron header-tag="h5" header-level="5" lead-tag="div" class="border mt-3 mb-0 p-3 text-center">
- <template v-slot:header>
- @text
- </template>
- <template v-slot:lead>
- @if (!string.IsNullOrEmpty(Model.SubTotalDiscount))
+
+ <div class="form-group col-12 pl-0 mb-1 d-flex">
+ @if (Model.IsAuction)
{
- <div class="form-group mb-1 d-flex justify-content-center">
- <label class="text-muted mb-0">@Loc["AddToCart.SubTotalDiscount"]</label>
- <label class="pl-3 mb-0 text-muted">@Model.SubTotalDiscount</label>
- </div>
+ <label class=""><strong>@Loc["AddToCart.Yourbid"]:</strong></label>
+ <label class="pl-3 mb-0">@Model.HighestBid</label>
}
- @if (!string.IsNullOrEmpty(Model.SubTotal))
+ else
{
- <div class="form-group mb-0 d-flex justify-content-center">
- <label class="text-dark mb-0">@Loc["AddToCart.SubTotal"]</label>
- <label class="pl-3 mb-0 text-dark mb-0">@Model.SubTotal</label>
- </div>
+ <label class=""><strong>@Loc["AddToCart.Price"]</strong></label>
+ <label class="pl-3 mb-0">@Model.Price</label>
}
- </template>
- </b-jumbotron>
- </b-col>
- </b-form-row>
- </b-col>
- <template v-slot:footer>
- <b-button-group class="w-100">
+ </div>
+ </div>
+ <div class="col-12">
+ <div class="jumbotron border mt-3 mb-0 p-3 text-center">
+ <h5>
+ @text
+ </h5>
+ <div class="lead">
+ @if (!string.IsNullOrEmpty(Model.SubTotalDiscount))
+ {
+ <div class="form-group mb-1 d-flex justify-content-center">
+ <label class="text-muted mb-0">@Loc["AddToCart.SubTotalDiscount"]</label>
+ <label class="pl-3 mb-0 text-muted">@Model.SubTotalDiscount</label>
+ </div>
+ }
+ @if (!string.IsNullOrEmpty(Model.SubTotal))
+ {
+ <div class="form-group mb-0 d-flex justify-content-center">
+ <label class="text-dark mb-0">@Loc["AddToCart.SubTotal"]</label>
+ <label class="pl-3 mb-0 text-dark mb-0">@Model.SubTotal</label>
+ </div>
+ }
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="card-footer">
+ <div class="btn-group w-100" role="group">
@if (Model.CartType == ShoppingCartType.Auctions)
{
- <b-button variant="outline-info" class="text-uppercase" @@click='$bvModal.hide("ModalAddToCart")'>@Loc["AddToCart.Continue"]</b-button>
+ <button class="btn btn-outline-info text-uppercase" @@click='$bvModal.hide("ModalAddToCart")'>@Loc["AddToCart.Continue"]</button>
}
else
{
- <b-button variant="outline-info" class="text-uppercase" @@click='$bvModal.hide("ModalAddToCart")'>@Loc["AddToCart.Continue"]</b-button>
+ <button class="btn btn-outline-info text-uppercase" @@click='$bvModal.hide("ModalAddToCart")'>@Loc["AddToCart.Continue"]</button>
}
@if (Model.CartType == ShoppingCartType.ShoppingCart || Model.CartType == ShoppingCartType.OnHoldCart)
{
- <b-button variant="info" class="text-uppercase" @@click="location='@(Url.RouteUrl("ShoppingCart"))'">@Loc["AddToCart.ViewCart"]</b-button>
+ <button class="btn btn-info text-uppercase" @@click="location='@(Url.RouteUrl("ShoppingCart"))'">@Loc["AddToCart.ViewCart"]</button>
}
else if (Model.CartType == ShoppingCartType.Wishlist)
{
- <b-button variant="info" class="text-uppercase" @@click="location='@(Url.RouteUrl("Wishlist"))'">@Loc["AddToCart.ViewWishlist"]</b-button>
+ <button class="btn btn-info text-uppercase" @@click="location='@(Url.RouteUrl("Wishlist"))'">@Loc["AddToCart.ViewWishlist"]</button>
}
else if (Model.CartType == ShoppingCartType.Auctions)
{
- <b-button variant="info" class="text-uppercase" @@click="location='@(Url.RouteUrl("CustomerAuctions"))'">@Loc["AddToCart.ViewAuctions"]</b-button>
+ <button class="btn btn-info text-uppercase" @@click="location='@(Url.RouteUrl("CustomerAuctions"))'">@Loc["AddToCart.ViewAuctions"]</button>
}
- </b-button-group>
- </template>
- </b-card>
+ </div>
+ </div>
+ </div>
</b-modal>
<div class="script-tag">
@await Component.InvokeAsync("Widget", new { widgetZone = "popup_add_to_cart_content_before", additionalData = Model })