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.

Merge

PatrykPorabikdfb0e2115937
diff --cc src/Web/Grand.Web/Views/Shared/_AddToCartQV.cshtml
index 87171b7e4,4298dcfdc..bda49ff55
--- a/src/Web/Grand.Web/Views/Shared/_AddToCartQV.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/_AddToCartQV.cshtml
@@@ -1,57 -1,76 +1,130 @@@
-@{
+@{
var addtocart = @Url.RouteUrl("AddProductDetails");
+ var updateitemcart = @Url.RouteUrl("UpdateItemCart");
}
+ <template v-if="PopupQuickViewVueModal.AddToCart.UpdatedShoppingCartItemId !== null">
+ <input type="hidden" id="shoppingCartItemId" name="shoppingCartItemId" :value="UpdatedShoppingCartItemId" />
+ </template>
+ <template v-if="PopupQuickViewVueModal.AddToCart.EnteredPrice">
+ <div class="customer-entered-price mb-3 d-flex w-100 flex-column">
+ <div class="price-input">
+ <label :for="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_CustomerEnteredPrice'" class="enter-price-label">@Loc["Products.EnterProductPrice"]</label>
+ <input :id="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_CustomerEnteredPrice'" :name="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '.CustomerEnteredPrice'" type="text" :value="PopupQuickViewVueModal.AddToCart.CustomerEnteredPrice" class="form-control enter-price-input" />
+ </div>
+ <div class="price-range pt-1">
+ {{PopupQuickViewVueModal.AddToCart.CustomerEnteredPriceRange}}
+ </div>
+ </div>
+ </template>
+ <div role="group" class="input-group product-add-to-cart flex-nowrap">
+ <template v-if="!PopupQuickViewVueModal.AddToCart.DisableBuyButton || PopupQuickViewVueModal.AddToCart.EnteredPrice">
+ <template v-if="PopupQuickViewVueModal.AddToCart.MinimumQuantityNotification !== null">
+ <div class="min-qty-notification text-danger w-100 mb-2">{{PopupQuickViewVueModal.AddToCart.MinimumQuantityNotification}}</div>
+ </template>
+ </template>
+ <template v-if="!PopupQuickViewVueModal.AddToCart.DisableBuyButton">
+ <template v-if="PopupQuickViewVueModal.AddToCart.AllowedQuantities.length > 0">
+ <select :id="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_EnteredQuantity'" :name="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '.EnteredQuantity'" class="custom-select form-control qty-dropdown mr-2">
+ <template v-for="option in PopupQuickViewVueModal.AddToCart.AllowedQuantities">
+ <option :value="option.Value" :disabled="option.Disabled" :selected="option.Selected">{{option.Text}}</option>
+ </template>
+ </select>
+ </template>
+ <template v-else>
+ <label :for="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_EnteredQuantity'" class="sr-only">@Loc["ShoppingCart.AddToCart"]</label>
+ <input v-model.number="PopupQuickViewVueModal.AddToCart.EnteredQuantity" :id="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_EnteredQuantity'" :name="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '.EnteredQuantity'" class="qty-input form-control text-center" type="number" inputmode="numeric" />
+ <template v-if="PopupQuickViewVueModal.AddToCart.MeasureUnit !== ''">
+ <span class="qty-unit d-flex align-items-center mr-2">
+ {{PopupQuickViewVueModal.AddToCart.MeasureUnit}}
+ </span>
+ </template>
+ </template>
+ <div class="input-group-append w-100">
+ <template v-if="typeof vmwishlist !== 'undefined' && PopupQuickViewVueModal.AddToCart.UpdatedShoppingCartItemId !== null">
+ <button :id="'add-to-wishlist-button-' + PopupQuickViewVueModal.AddToCart.ProductId" class="btn btn-info w-100 d-inline-flex main-button" title="@Loc["ShoppingCart.AddToWishlist.Update"]" :data-productid="PopupQuickViewVueModal.AddToCart.ProductId" :onclick="'AxiosCart.updateitem(`@updateitemcart`, `#product-details-form`);return false;'" v-b-tooltip.hover.bottom>
+ <span>
+ @Loc["ShoppingCart.AddToWishlist.Update"]
+ </span>
+ </button>
+ </template>
+ <template v-else>
+ <button type="button" :id="'add-to-cart-button-' + PopupQuickViewVueModal.AddToCart.ProductId" class="btn btn-info w-100 main-button d-inline-flex"
+ data-productid="PopupQuickViewVueModal.AddToCart.ProductId" :onclick="PopupQuickViewVueModal.AddToCart.UpdatedShoppingCartItemId !== null ?
+ 'AxiosCart.updateitem(`@updateitemcart`, `#product-details-form`);return false;' :
+ 'AxiosCart.addproducttocart_details(`@addtocart/' + PopupQuickViewVueModal.AddToCart.ProductId + '/1`, `#product-details-form`);return false;'">
+ <span>
+ <template v-if="PopupQuickViewVueModal.AddToCart.IsAuction">
+ @Loc["ShoppingCart.BuyNow"]
+ </template>
+ <template v-else-if="PopupQuickViewVueModal.AddToCart.IsReservation">
+ @Loc["ShoppingCart.Reservation"]
+ </template>
+ <template v-else-if="PopupQuickViewVueModal.AddToCart.AvailableForPreOrder">
+ @Loc["ShoppingCart.PreOrder"]
+ </template>
+ <template v-else-if="PopupQuickViewVueModal.AddToCart.UpdateShoppingCartItemType !== null">
+ @Loc["ShoppingCart.AddToCart.Update"]
+ </template>
+ <template v-else>
+ @Loc["ShoppingCart.AddToCart"]
+ </template>
+ </span>
+ </button>
+ </template>
+ </div>
+ </template>
- </div>
++ </div>
+<template v-if="PopupQuickViewVueModal.AddToCart.EnteredPrice">
+ <div class="customer-entered-price mb-3 d-flex w-100 flex-column">
+ <div class="price-input">
+ <label :for="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_CustomerEnteredPrice'" class="enter-price-label">@Loc["Products.EnterProductPrice"]</label>
+ <input :id="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_CustomerEnteredPrice'" :name="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '.CustomerEnteredPrice'" type="text" :value="PopupQuickViewVueModal.AddToCart.CustomerEnteredPrice" class="form-control enter-price-input" />
+ </div>
+ <div class="price-range pt-1">
+ {{PopupQuickViewVueModal.AddToCart.CustomerEnteredPriceRange}}
+ </div>
+ </div>
+</template>
+<template v-if="!PopupQuickViewVueModal.AddToCart.DisableBuyButton || PopupQuickViewVueModal.AddToCart.EnteredPrice">
+ <template v-if="PopupQuickViewVueModal.AddToCart.MinimumQuantityNotification !== null">
+ <div class="min-qty-notification text-danger w-100 mb-2">{{PopupQuickViewVueModal.AddToCart.MinimumQuantityNotification}}</div>
+ </template>
+</template>
+<div role="group" class="input-group product-add-to-cart flex-nowrap">
+ <template v-if="!PopupQuickViewVueModal.AddToCart.DisableBuyButton">
+ <template v-if="PopupQuickViewVueModal.AddToCart.AllowedQuantities.length > 0">
+ <select :id="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_EnteredQuantity'" :name="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '.EnteredQuantity'" class="custom-select form-control qty-dropdown mr-2">
+ <template v-for="option in PopupQuickViewVueModal.AddToCart.AllowedQuantities">
+ <option :value="option.Value" :disabled="option.Disabled" :selected="option.Selected">{{option.Text}}</option>
+ </template>
+ </select>
+ </template>
+ <template v-else>
+ <label :for="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_EnteredQuantity'" class="sr-only">@Loc["ShoppingCart.AddToCart"]</label>
+ <input :value="PopupQuickViewVueModal.AddToCart.EnteredQuantity" :id="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '_EnteredQuantity'" :name="'addtocart_' + PopupQuickViewVueModal.AddToCart.ProductId + '.EnteredQuantity'" value="" class="qty-input form-control text-center" type="number" inputmode="numeric" />
+ <template v-if="PopupQuickViewVueModal.AddToCart.MeasureUnit !== ''">
+ <span class="qty-unit d-flex align-items-center mr-2">
+ {{PopupQuickViewVueModal.AddToCart.MeasureUnit}}
+ </span>
+ </template>
+ </template>
+ <div class="input-group-append w-100">
+ <button type="button" :id="'add-to-cart-button-' + PopupQuickViewVueModal.AddToCart.ProductId" class="btn btn-info w-100 add-to-cart-button d-inline-flex" data-productid="PopupQuickViewVueModal.AddToCart.ProductId" :onclick="'AxiosCart.addproducttocart_details(`@addtocart/' + PopupQuickViewVueModal.AddToCart.ProductId + '/1`, `#product-details-form`);return false;'">
+ <span>
+ <template v-if="PopupQuickViewVueModal.AddToCart.IsAuction">
+ @Loc["ShoppingCart.BuyNow"]
+ </template>
+ <template v-else-if="PopupQuickViewVueModal.AddToCart.IsReservation">
+ @Loc["ShoppingCart.Reservation"]
+ </template>
+ <template v-else-if="PopupQuickViewVueModal.AddToCart.AvailableForPreOrder">
+ @Loc["ShoppingCart.PreOrder"]
+ </template>
+ <template v-else>
+ @Loc["ShoppingCart.AddToCart"]
+ </template>
+ </span>
+ </button>
+ </div>
+ </template>
+</div>