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.

QuickView - razor view translated to Vue

DanielŻuławskida04031417c4
diff --git a/src/Web/Grand.Web/Views/Product/_ProductAttributes.cshtml b/src/Web/Grand.Web/Views/Product/_ProductAttributes.cshtml
index 61ef0574f..b5c3317a5 100644
--- a/src/Web/Grand.Web/Views/Product/_ProductAttributes.cshtml
+++ b/src/Web/Grand.Web/Views/Product/_ProductAttributes.cshtml
@@ -9,6 +9,7 @@
var attributeChangeScriptsBuilder = new StringBuilder();
var productId = Model.First().ProductId;
var attributeChangeHandlerFuncName = string.Format("attribute_change_handler_{0}", productId);
+ var fileLink = @Url.RouteUrl("UploadFileProductAttribute");
//generate change event script
foreach (var attribute in Model)
{
@@ -242,7 +243,7 @@
type="file"
id="qqfile"
name="qqfile"
- :data-url="'/uploadfileproductattribute/' + attribute.Id + '?productId=' + attribute.ProductId"
+ :data-url="'@fileLink/' + attribute.Id + '?productId=' + attribute.ProductId"
onchange="uploadFile(this)"
/>
</div>
diff --git a/src/Web/Grand.Web/Views/Product/_ReservationInfo.cshtml b/src/Web/Grand.Web/Views/Product/_ReservationInfo.cshtml
index d526efaed..101a8a1b3 100644
--- a/src/Web/Grand.Web/Views/Product/_ReservationInfo.cshtml
+++ b/src/Web/Grand.Web/Views/Product/_ReservationInfo.cshtml
@@ -1,9 +1,6 @@
@model ProductDetailsModel
@inject SeoSettings seoSettings
@using System.Globalization
-<link href="/theme/css/pikaday.min.css" type="text/css" rel="stylesheet">
-<script asp-location="Header" src="/theme/lib/pikaday.min.js"></script>
-<script asp-location="Header" src="/theme/script/public.reservation.js"></script>
<div>
@if (Model.Parameters.Any())
{
diff --git a/src/Web/Grand.Web/Views/Shared/Head.cshtml b/src/Web/Grand.Web/Views/Shared/Head.cshtml
index 1af703ba3..320de516d 100644
--- a/src/Web/Grand.Web/Views/Shared/Head.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/Head.cshtml
@@ -12,6 +12,7 @@
<link rel="stylesheet" type="text/css" href="/bundles/site.min.css">
</environment>
+ <link href="/theme/css/pikaday.min.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/assets/custom/style.css">
if (supportRtl)
@@ -40,6 +41,8 @@
<script src="/theme/script/validation-config.min.js"></script>
<script src="/theme/script/public.common.js"></script>
<script src="/theme/script/public.axios.js"></script>
+ <script src="/theme/lib/pikaday.min.js"></script>
+ <script src="/theme/script/public.reservation.js"></script>
<script asp-location="Footer" asp-src="/theme/script/menu.js"></script>
<script asp-location="Footer" asp-src="/theme/lib/popper.min.js"></script>
diff --git a/src/Web/Grand.Web/Views/Shared/_AddToCartGroupQV.cshtml b/src/Web/Grand.Web/Views/Shared/_AddToCartGroupQV.cshtml
new file mode 100644
index 000000000..a5ca878ab
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_AddToCartGroupQV.cshtml
@@ -0,0 +1,54 @@
+<template v-if="variant.AddToCart.EnteredPrice">
+ <div class="customer-entered-price mb-3 d-flex w-100 flex-column">
+ <div class="price-input">
+ <label :for="'addtocart_' + variant.AddToCart.ProductId + '_CustomerEnteredPrice'" class="enter-price-label">@Loc["Products.EnterProductPrice"]</label>
+ <input :id="'addtocart_' + variant.AddToCart.ProductId + '_CustomerEnteredPrice'" :name="'addtocart_' + variant.AddToCart.ProductId + '.CustomerEnteredPrice'" type="text" :value="variant.AddToCart.CustomerEnteredPrice" class="form-control enter-price-input" />
+ </div>
+ <div class="price-range pt-1">
+ {{variant.AddToCart.CustomerEnteredPriceRange}}
+ </div>
+ </div>
+</template>
+<div role="group" class="input-group product-add-to-cart flex-nowrap">
+ <template v-if="!variant.AddToCart.DisableBuyButton || variant.AddToCart.EnteredPrice">
+ <template v-if="variant.AddToCart.MinimumQuantityNotification !== null">
+ <div class="min-qty-notification text-danger w-100 mb-2">{{variant.AddToCart.MinimumQuantityNotification}}</div>
+ </template>
+ </template>
+ <template v-if="!variant.AddToCart.DisableBuyButton">
+ <template v-if="variant.AddToCart.AllowedQuantities.length > 0">
+ <select :id="'addtocart_' + variant.AddToCart.ProductId + '_EnteredQuantity'" :name="'addtocart_' + variant.AddToCart.ProductId + '.EnteredQuantity'" class="custom-select form-control qty-dropdown mr-2">
+ <template v-for="option in variant.AddToCart.AllowedQuantities">
+ <option :value="option.Value" :disabled="option.Disabled" :selected="option.Selected">{{option.Text}}</option>
+ </template>
+ </select>
+ </template>
+ <template v-else>
+ <label :for="'addtocart_' + variant.AddToCart.ProductId + '_EnteredQuantity'" class="sr-only">@Loc["ShoppingCart.AddToCart"]</label>
+ <input :value="variant.AddToCart.EnteredQuantity" :id="'addtocart_' + variant.AddToCart.ProductId + '_EnteredQuantity'" :name="'addtocart_' + variant.AddToCart.ProductId + '.EnteredQuantity'" value="" class="qty-input form-control text-center" type="number" inputmode="numeric" />
+ <template v-if="variant.AddToCart.MeasureUnit !== null">
+ <span class="qty-unit d-flex align-items-center mr-2">
+ {{variant.AddToCart.MeasureUnit}}
+ </span>
+ </template>
+ </template>
+ <div class="input-group-append">
+ <button type="button" :id="'add-to-cart-button-' + variant.AddToCart.ProductId" class="btn btn-info w-100 add-to-cart-button d-inline-flex" data-productid="variant.AddToCart.ProductId" :onclick="'AxiosCart.addproducttocart_details(`/addproducttocart/details/' + variant.AddToCart.ProductId + '/1`, `#product-details-form`);return false;'">
+ <span>
+ <template v-if="variant.AddToCart.IsAuction">
+ @Loc["ShoppingCart.BuyNow"]
+ </template>
+ <template v-else-if="variant.AddToCart.IsReservation">
+ @Loc["ShoppingCart.Reservation"]
+ </template>
+ <template v-else-if="variant.AddToCart.AvailableForPreOrder">
+ @Loc["ShoppingCart.PreOrder"]
+ </template>
+ <template v-else>
+ @Loc["ShoppingCart.AddToCart"]
+ </template>
+ </span>
+ </button>
+ </div>
+ </template>
+</div>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_AddToCartQV.cshtml b/src/Web/Grand.Web/Views/Shared/_AddToCartQV.cshtml
new file mode 100644
index 000000000..b5a9fbd60
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_AddToCartQV.cshtml
@@ -0,0 +1,57 @@
+@{
+ var addtocart = @Url.RouteUrl("AddProductDetails");
+}
+<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 :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>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_AddToWishlistQV.cshtml b/src/Web/Grand.Web/Views/Shared/_AddToWishlistQV.cshtml
new file mode 100644
index 000000000..53b0e8120
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_AddToWishlistQV.cshtml
@@ -0,0 +1,16 @@
+@{
+ var addtowishlist = @Url.RouteUrl("AddProductDetails");
+}
+<template v-if="!PopupQuickViewVueModal.AddToCart.DisableWishlistButton">
+ <button id="'add-to-wishlist-button-' + PopupQuickViewVueModal.AddToCart.ProductId" class="btn btn-secondary add-to-wishlist-button mr-1" :data-productid="PopupQuickViewVueModal.AddToCart.ProductId" :onclick="'AxiosCart.addproducttocart_details(`@addtowishlist/' + PopupQuickViewVueModal.AddToCart.ProductId + '/2`, `#product-details-form`);return false;'" v-b-tooltip.hover.bottom>
+ <span class="sr-only">
+ <template v-if="PopupQuickViewVueModal.AddToCart.UpdatedShoppingCartItemId !== null && PopupQuickViewVueModal.AddToCart.UpdateShoppingCartItemType == 2">
+ @Loc["ShoppingCart.AddToWishlist.Update"];
+ </template>
+ <template v-else>
+ @Loc["ShoppingCart.AddToWishlist"];
+ </template>
+ </span>
+ <b-icon icon="heart"></b-icon>
+ </button>
+</template>
diff --git a/src/Web/Grand.Web/Views/Shared/_AttributesQV.cshtml b/src/Web/Grand.Web/Views/Shared/_AttributesQV.cshtml
new file mode 100644
index 000000000..3dfdd6440
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_AttributesQV.cshtml
@@ -0,0 +1,163 @@
+@{
+ var fileLink = @Url.RouteUrl("UploadFileProductAttribute");
+}
+<td :id="'product_attribute_label_' + attribute.Id">
+ <span class="attribute-name">{{attribute.Name}}</span> <span v-if="attribute.IsRequired" class="required">*</span>
+ <template v-if="attribute.TextPrompt !==null">
+ <span class="text-prompt">{{attribute.TextPrompt}}</span>
+ </template>
+ <template v-if="attribute.Description !==null">
+ <span v-html="attribute.Description" class="attribute-description"></span>
+ </template>
+</td>
+<td :id="'product_attribute_input_' + attribute.Id">
+ <template v-if="attribute.AttributeControlType==4">
+ <label :for="'product_attribute_' + attribute.Id" class="sr-only">product_attribute_{{attribute.Id}}</label>
+ <input :name="'product_attribute_' + attribute.Id" type="text" class="form-control textbox" :id="'product_attribute_' + attribute.Id" :value="attribute.DefaultValue" @@change="vm.attrchange(attribute.ProductId, attribute.HasCondition, true)" />
+ </template>
+ <template v-if="attribute.AttributeControlType==1">
+ <label :for="'product_attribute_' + attribute.Id" class="sr-only">product_attribute_{{attribute.Id}}</label>
+ <select :id="'product_attribute_' + attribute.Id" class="form-control custom-select" :name="'product_attribute_' + attribute.Id" @@change="vm.attrchange(attribute.ProductId, attribute.HasCondition, true)">
+ <template v-if="attribute.IsRequired==false">
+ <option value="">---</option>
+ </template>
+ <option v-for="attributeValue in attribute.Values" :selected="attributeValue.IsPreSelected" :value="attributeValue.Id">
+ <template v-if="attributeValue.PriceAdjustment==null">
+ {{attributeValue.Name}}
+ </template>
+ <template v-else>
+ {{attributeValue.Name}}[{{attributeValue.PriceAdjustment}}]
+ </template>
+ </option>
+ </select>
+ </template>
+ <template v-if="attribute.AttributeControlType==2">
+ <ul class="option-list px-0 mb-0">
+ <li v-for="attributeValue in attribute.Values">
+ <fieldset>
+ <legend class="sr-only">product_attribute_{{attribute.Id}}</legend>
+ <label class="custom-control custom-radio">
+ <input class="custom-control-input"
+ :id="'product_attribute_' + attribute.Id + '_' + attributeValue.Id"
+ type="radio"
+ :name="'product_attribute_' + attribute.Id"
+ :value="attributeValue.Id"
+ :checked="attributeValue.IsPreSelected"
+ @@change="vm.attrchange(attribute.ProductId, attribute.HasCondition, true)" />
+ <span class="custom-control-label"></span>
+ <span class="custom-control-description" :for="'product_attribute_' + attribute.Id + '_' + attributeValue.Id">
+ <template v-if="attributeValue.PriceAdjustment==null">
+ {{attributeValue.Name}}
+ </template>
+ <template v-else>
+ {{attributeValue.Name}}[{{attributeValue.PriceAdjustment}}]
+ </template>
+ </span>
+ </label>
+ </fieldset>
+ </li>
+ </ul>
+ </template>
+ <template v-if="attribute.AttributeControlType==3 || attribute.AttributeControlType==50">
+ <fieldset>
+ <legend></legend>
+ <ul class="option-list px-0 mb-0">
+ <li v-for="attributeValue in attribute.Values">
+ <label class="custom-control custom-checkbox">
+ <input v-if="attribute.AttributeControlType==50"
+ class="custom-control-input"
+ :id="'product_attribute_' + attribute.Id + '_' + attributeValue.Id"
+ type="checkbox"
+ :name="'product_attribute_' + attribute.Id"
+ :value="attributeValue.Id"
+ :checked="attributeValue.IsPreSelected"
+ @@change="vm.attrchange(attribute.ProductId, attribute.HasCondition, true)"
+ disabled="disabled" />
+ <input v-else
+ class="custom-control-input"
+ :id="'product_attribute_' + attribute.Id + '_' + attributeValue.Id"
+ type="checkbox"
+ :name="'product_attribute_' + attribute.Id"
+ :value="attributeValue.Id"
+ :checked="attributeValue.IsPreSelected"
+ @@change="vm.attrchange(attribute.ProductId, attribute.HasCondition, true)" />
+ <span class="custom-control-label"></span>
+ <span class="custom-control-description" :for="'product_attribute_' + attribute.Id + '_' + attributeValue.Id">
+ <template v-if="attributeValue.PriceAdjustment==null">
+ {{attributeValue.Name}}
+ </template>
+ <template v-else>
+ {{attributeValue.Name}}[{{attributeValue.PriceAdjustment}}]
+ </template>
+ </span>
+ </label>
+ </li>
+ </ul>
+ </fieldset>
+ </template>
+ <template v-if="attribute.AttributeControlType==10">
+ <textarea :id="'product_attribute_' + attribute.Id" :name="'product_attribute_' + attribute.Id">{{attribute.DefaultValue}}</textarea>
+ </template>
+ <template v-if="attribute.AttributeControlType==30">
+ <template>
+ <div :id="'product_attribute_' + attribute.Id + 'uploader'">
+ <b-form-file :accept="attribute.AllowedFileExtensions"
+ type="file"
+ id="qqfile"
+ name="qqfile"
+ :data-url="'@fileLink/' + attribute.Id + '?productId=' + attribute.ProductId"
+ @@change="vm.uploadFile($event.target)" />
+ </div>
+ </template>
+ <input class="hidden-upload-input"
+ type="hidden"
+ :id="'product_attribute_' + attribute.Id"
+ :name="'product_attribute_' + attribute.Id"
+ v-model="attribute.DefaultValue"
+ :value="attribute.DefaultValue" />
+ <div id="download-message" class="alert my-2" style="display: none;"></div>
+ <div :id="'product_attribute_' + attribute.Id + 'downloadurl'" class="download-file" style="display: none;"><a class="btn btn-outline-info"> Download </a></div>
+ </template>
+ <template v-if="attribute.AttributeControlType==40">
+ <ul class="option-list color-squares w-100 d-inline-flex flex-wrap px-0 mb-0" :id="'color-squares-' + attribute.Id">
+ <li v-for="attributeValue in attribute.Values" class="mr-1 p-0">
+ <label :for="'product_attribute_' + attribute.Id + '_' + attributeValue.Id" class="mb-0">
+ <input :id="'product_attribute_' + attribute.Id + '_' + attributeValue.Id" type="radio" :name="'product_attribute_' + attribute.Id" :value="attributeValue.Id" :checked="attributeValue.IsPreSelected" @@change="vm.attrchange(attribute.ProductId, attribute.HasCondition, true)" />
+ <template v-if="attributeValue.PriceAdjustment==null">
+ <span class="color-container" :title="attributeValue.Name"> <span class="color" :style="'background-color:' + attributeValue.ColorSquaresRgb"></span> </span>
+ </template>
+ <template v-else>
+ <span class="color-container" :title="attributeValue.Name + ' [' + attributeValue.PriceAdjustment + ']'"> <span class="color" :style="'background-color:' + attributeValue.ColorSquaresRgb"></span> </span>
+ </template>
+ </label>
+ </li>
+ </ul>
+ </template>
+ <template v-if="attribute.AttributeControlType==45">
+ <ul class="option-list color-squares w-100 d-inline-flex flex-wrap px-0 mb-0" :id="'color-squares-' + attribute.Id">
+ <li v-for="attributeValue in attribute.Values" class="mr-1 p-0">
+ <label :for="'product_attribute_' + attribute.Id + '_' + attributeValue.Id" class="mb-0">
+ <template v-if="attributeValue.PriceAdjustment==null">
+ <input :id="'product_attribute_' + attribute.Id + '_' + attributeValue.Id" type="radio" :name="'product_attribute_' + attribute.Id" :value="attributeValue.Id" :checked="attributeValue.IsPreSelected" @@change="vm.attrchange(attribute.ProductId, attribute.HasCondition, true)" />
+ <span :id="'imgSqr_' + attributeValue.Id" class="color-container">
+ <span class="color" :style="'background: url(' + attributeValue.ImageSquaresPictureModel.ImageUrl + ') 50% 50% no-repeat;'"></span>
+ </span>
+ <b-tooltip :target="'imgSqr_' + attributeValue.Id" placement="bottom">
+ <div class="image-square-tooltip"><img :src="attributeValue.ImageSquaresPictureModel.FullSizeImageUrl" :alt="attributeValue.Name" /> <span>{{attributeValue.Name}}</span></div>
+ </b-tooltip>
+ </template>
+ <template v-else>
+ <input :id="'product_attribute_' + attribute.Id + '_' + attributeValue.Id" type="radio" :name="'product_attribute_' + attribute.Id" :value="attributeValue.Id" :checked="attributeValue.IsPreSelected" @@change="vm.attrchange(attribute.ProductId, attribute.HasCondition, true)" />
+ <span class="color-container"> <span class="color" :style="'background: url(' + attributeValue.ImageSquaresPictureModel.ImageUrl + ') 50% 50% no-repeat;'"></span> </span>
+ <b-tooltip :target="'imgSqr_' + attributeValue.Id" placement="bottom">
+ <div class="image-square-tooltip">
+ <img :src="attributeValue.ImageSquaresPictureModel.FullSizeImageUrl" :alt="attributeValue.Name + ' [' + attributeValue.PriceAdjustment + ']'" />
+ <span>{{attributeValue.Name}}[{{attributeValue.PriceAdjustment}}]</span>
+ </div>
+ </b-tooltip>
+ </template>
+ </label>
+ </li>
+ </ul>
+ </template>
+</td>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_AuctionInfoQV.cshtml b/src/Web/Grand.Web/Views/Shared/_AuctionInfoQV.cshtml
new file mode 100644
index 000000000..01e3c8511
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_AuctionInfoQV.cshtml
@@ -0,0 +1,40 @@
+<template v-if="PopupQuickViewVueModal.ProductType == 40">
+ <div class="row">
+ <div class="form-group col-12">
+ <template v-if="PopupQuickViewVueModal.EndTime !== null">
+ <div class="countdown-box alert alert-info">
+ <template v-if="new Date(PopupQuickViewVueModal.EndTime).getTime() > new Date().getTime()">
+ <countdown :end-time="new Date(PopupQuickViewVueModal.EndTime).getTime()">
+ <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>
+ </template>
+ <template v-else>
+ <div class="d-inline-flex flex-wrap flex-column">
+ <label class="ended-label col-form-label mb-0">@Loc["ShoppingCart.Auctionends"]:</label>
+ <div class="count-date d-flex" v-html="new Date(PopupQuickViewVueModal.EndTimeLocalTime).toLocaleString()"></div>
+ </div>
+ </template>
+ </div>
+ </template>
+ <template v-if="new Date(PopupQuickViewVueModal.EndTime).getTime() > new Date().getTime()">
+ <div class="input-group product-add-to-cart flex-nowrap">
+ <input :id="'auction_' + PopupQuickViewVueModal.Id + '_HighestBidValue'" :name="'auction_' + PopupQuickViewVueModal.Id + '.HighestBidValue'" type="number" class="form-control bid-input" :value="PopupQuickViewVueModal.HighestBidValue + 1" />
+ <div class="input-group-append">
+ <button :id="'bid-button-' + PopupQuickViewVueModal.Id" class="btn btn-info add-to-cart-button d-inline-flex align-items-center" :data-productid="PopupQuickViewVueModal.Id" :onclick="'AxiosCart.addbid(`/addbid/AddBid/'+ PopupQuickViewVueModal.Id +'/3`, `#product-details-form`); return false;'">
+ <b-icon icon="hammer" class="mx-1"></b-icon><span>@Loc["ShoppingCart.Bid"]</span>
+ </button>
+ </div>
+ </div>
+ </template>
+ </div>
+ </div>
+</template>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_GiftVoucherInfoQV.cshtml b/src/Web/Grand.Web/Views/Shared/_GiftVoucherInfoQV.cshtml
new file mode 100644
index 000000000..bd230b407
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_GiftVoucherInfoQV.cshtml
@@ -0,0 +1,33 @@
+<template v-if="PopupQuickViewVueModal.GiftVoucher.IsGiftVoucher">
+ <div class="giftvoucher generalMarginSupporter">
+ <fieldset>
+ <legend class="sr-only">@Loc["Products.GiftVoucher.RecipientName"]</legend>
+ <label :for="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_RecipientName'" class="col-form-label">@Loc["Products.GiftVoucher.RecipientName"]:</label>
+ <input :id="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_RecipientName'" :name="'giftvoucher_'+ PopupQuickViewVueModal.Id +'.RecipientName'" class="form-control recipient-name" />
+ </fieldset>
+ <template v-if="PopupQuickViewVueModal.GiftVoucher.GiftVoucherType == 0">
+ <fieldset>
+ <legend class="sr-only">@Loc["Products.GiftVoucher.RecipientEmail"]</legend>
+ <label :for="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_RecipientEmail'" class="col-form-label">@Loc["Products.GiftVoucher.RecipientEmail"]:</label>
+ <input :id="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_RecipientEmail'" :name="'giftvoucher_'+ PopupQuickViewVueModal.Id +'.RecipientEmail'" class="form-control recipient-email" />
+ </fieldset>
+ </template>
+ <fieldset>
+ <legend class="sr-only">@Loc["Products.GiftVoucher.SenderName"]</legend>
+ <label :for="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_SenderName'" class="col-form-label">@Loc["Products.GiftVoucher.SenderName"]:</label>
+ <input :id="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_SenderName'" :name="'giftvoucher_'+ PopupQuickViewVueModal.Id +'.SenderName'" class="form-control seder-name" />
+ </fieldset>
+ <template v-if="PopupQuickViewVueModal.GiftVoucher.GiftVoucherType == 0">
+ <fieldset>
+ <legend class="sr-only">@Loc["Products.GiftVoucher.SenderEmail"]</legend>
+ <label :for="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_SenderEmail'" class="col-form-label">@Loc["Products.GiftVoucher.SenderEmail"]:</label>
+ <input :id="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_SenderEmail'" :name="'giftvoucher_'+ PopupQuickViewVueModal.Id +'.SenderEmail'" class="form-control seder-email" />
+ </fieldset>
+ </template>
+ <fieldset>
+ <legend class="sr-only">@Loc["Products.GiftVoucher.Message"]</legend>
+ <label :for="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_Message'" class="col-form-label">@Loc["Products.GiftVoucher.Message"]:</label>
+ <textarea :id="'giftvoucher_'+ PopupQuickViewVueModal.Id +'_Message'" :name="'giftvoucher_'+ PopupQuickViewVueModal.Id +'.Message'" class="form-control seder-message"></textarea>
+ </fieldset>
+ </div>
+</template>
diff --git a/src/Web/Grand.Web/Views/Shared/_LinkedProducts.cshtml b/src/Web/Grand.Web/Views/Shared/_LinkedProducts.cshtml
new file mode 100644
index 000000000..766fb07fb
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_LinkedProducts.cshtml
@@ -0,0 +1,36 @@
+<template v-if="ProductsAlsoPurchased !== null">
+ <div v-if="ProductsAlsoPurchased.length > 0" class="also-purchased-products-grid linked-product-grid product-grid col-12 px-0">
+ <h2 class="h3 generalTitle text-center">@Loc["Products.AlsoPurchased"]</h2>
+ <div class="form-row">
+ <template v-for="Model in ProductsAlsoPurchased">
+ <div class="col-xl-3 col-lg-4 col-md-4 col-sm-6 product-container mb-2">
+ <partial name="_CatalogProductViewVue"/>
+ </div>
+ </template>
+ </div>
+ </div>
+</template>
+<template v-if="SimilarProducts !== null">
+ <div v-if="SimilarProducts.length > 0" class="similar-products-grid linked-product-grid product-grid col-12 px-0">
+ <h2 class="h3 generalTitle text-center">@Loc["Products.SimilarProducts"]</h2>
+ <div class="form-row">
+ <template v-for="Model in SimilarProducts">
+ <div class="col-xl-3 col-lg-4 col-md-4 col-sm-6 product-container mb-2">
+ <partial name="_CatalogProductViewVue" />
+ </div>
+ </template>
+ </div>
+ </div>
+</template>
+<template v-if="RelatedProducts !== null">
+ <div v-if="RelatedProducts.length > 0" class="related-products-grid linked-product-grid product-grid col-12 px-0">
+ <h2 class="h3 generalTitle text-center">@Loc["Products.RelatedProducts"]</h2>
+ <div class="form-row">
+ <template v-for="Model in RelatedProducts">
+ <div class="col-xl-3 col-lg-4 col-md-4 col-sm-6 product-container mb-2">
+ <partial name="_CatalogProductViewVue" />
+ </div>
+ </template>
+ </div>
+ </div>
+</template>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_Notifications.cshtml b/src/Web/Grand.Web/Views/Shared/_Notifications.cshtml
index 78cac329b..56ddc48f9 100644
--- a/src/Web/Grand.Web/Views/Shared/_Notifications.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/_Notifications.cshtml
@@ -39,4 +39,5 @@
<div id="bar-notification" class="generalNote"></div>
<div class="modal-place"></div>
<partial name="_PopupAddToCart" />
+<partial name="_ProductLayout.QuickViewVue" />
@await Component.InvokeAsync("PopupAction")
diff --git a/src/Web/Grand.Web/Views/Shared/_PricesGroupQV.cshtml b/src/Web/Grand.Web/Views/Shared/_PricesGroupQV.cshtml
new file mode 100644
index 000000000..02af491b9
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_PricesGroupQV.cshtml
@@ -0,0 +1,85 @@
+<template>
+ <div class="prices d-flex justify-content-center align-items-start flex-column" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+ <template v-if="PopupQuickViewVueModal.ProductPrice.EnteredPrice">
+ @*Display empty space*@
+ </template>
+ <template v-else-if="PopupQuickViewVueModal.ProductPrice.CallForPrice">
+ <div class="product-price call-for-price col-12 px-0">
+ <span>@Loc["Products.CallForPrice"]</span>
+ </div>
+ </template>
+ <template v-else>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.IsReservation">
+ <div class="rental-price mb-2">
+ <label class="mb-0">@Loc["Products.Price.ReservationPrice"]:</label>
+ <span>{{PopupQuickViewVueModal.ProductPrice.ReservationPrice}}</span>
+ </div>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.IsAuction">
+ <div class="actual-price">
+ <template v-if="PopupQuickViewVueModal.ProductPrice.HighestBidValue > 0">
+ <label class="mb-0">@Loc["Products.Price.CurrentPrice"]:</label>
+ <span>{{PopupQuickViewVueModal.ProductPrice.HighestBid}}</span>
+ </template>
+ <template v-else>
+ <label class="mb-0">@Loc["Products.Price.StartPrice"]:</label>
+ <span>{{PopupQuickViewVueModal.ProductPrice.StartPrice}}</span>
+ </template>
+ </div>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.CatalogPrice !== null">
+ <div class="catalog-product-price col-12 px-0 mb-2">
+ <label class="col-form-label mb-0">@Loc["Products.Price.CatalogPrice"]:</label>
+ <span class="h6 mb-0">{{PopupQuickViewVueModal.ProductPrice.CatalogPrice}}</span>
+ </div>
+ </template>
+ <template v-if="!(PopupQuickViewVueModal.ProductPrice.IsAuction && PopupQuickViewVueModal.ProductPrice.DisableBuyButton)">
+ <div v-bind:class="{ 'product-price col-12 px-0 d-inline-flex align-items-center': (PopupQuickViewVueModal.ProductPrice.PriceWithDiscount !== null), 'non-discounted-price col-12 px-0 d-flex align-items-center': (PopupQuickViewVueModal.ProductPrice.PriceWithDiscount == null) }">
+ <span :class="'price-value-' + PopupQuickViewVueModal.ProductPrice.ProductId " v-bind:class="{ 'actual-price': (PopupQuickViewVueModal.ProductPrice.PriceWithDiscount == null) }">
+ <template v-if="PopupQuickViewVueModal.ProductPrice.IsAuction">
+ <strong class="actual-price">@Loc["Products.BuyNowPrice"]:</strong>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.PriceWithDiscount == null">
+ <span class="actual-price" v-html="PopupQuickViewVueModal.ProductPrice.Price"></span>
+ </template>
+ <template v-else>
+ <strong>{{Model.Price}}</strong>
+ </template>
+ </span>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.OldPrice !== null">
+ <div class="old-product-price">
+ <span class="old-price mx-2">{{PopupQuickViewVueModal.ProductPrice.OldPrice}}</span>
+ </div>
+ </template>
+ </div>
+ </template>
+ <template v-else>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.OldPrice !== null">
+ <div class="old-product-price">
+ <span class="old-price mx-2">{{Model.OldPrice}}</span>
+ </div>
+ </template>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.PriceWithDiscount !== null">
+ <div class="d-inline-flex align-items-center product-price discounted-price col-12 px-0">
+ <label class="mb-0 mx-2">@Loc["Products.Price.WithDiscount"]:</label>
+ <span :class="'your-price price-value-' + PopupQuickViewVueModal.ProductPrice.ProductId">
+ <strong class="actual-price" v-html="PopupQuickViewVueModal.ProductPrice.PriceWithDiscount"></strong>
+ </span>
+ <meta itemprop="price" content="PopupQuickViewVueModal.ProductPrice.PriceValue" :class="'your-price price-value-' + PopupQuickViewVueModal.ProductId" />
+ </div>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.BasePricePAngV !== null">
+ <div class="base-price-pangv ml-2">
+ {{PopupQuickViewVueModal.ProductPrice.BasePricePAngV}}
+ </div>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.CurrencyCode !== null">
+ <meta itemprop="priceCurrency" :content="PopupQuickViewVueModal.ProductPrice.CurrencyCode" />
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.PriceWithDiscount">
+ <meta itemprop="price" :content="PopupQuickViewVueModal.ProductPrice.PriceValue" />
+ </template>
+ </template>
+ </div>
+</template>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_PricesQV.cshtml b/src/Web/Grand.Web/Views/Shared/_PricesQV.cshtml
new file mode 100644
index 000000000..a7a389c3a
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_PricesQV.cshtml
@@ -0,0 +1,87 @@
+<template v-if="PopupQuickViewVueModal.ProductType !== 10">
+ <div class="prices d-flex justify-content-center align-items-start flex-column" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
+ <template v-if="PopupQuickViewVueModal.ProductPrice.EnteredPrice">
+ @*Display empty space*@
+ </template>
+ <template v-else-if="PopupQuickViewVueModal.ProductPrice.CallForPrice">
+ <div class="product-price call-for-price col-12 px-0">
+ <span>@Loc["Products.CallForPrice"]</span>
+ </div>
+ </template>
+ <template v-else>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.IsReservation">
+ <div class="rental-price mb-2">
+ <label class="mb-0">@Loc["Products.Price.ReservationPrice"]:</label>
+ <span>{{PopupQuickViewVueModal.ProductPrice.ReservationPrice}}</span>
+ </div>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.IsAuction">
+ <template v-if="PopupQuickViewVueModal.ProductPrice.HighestBidValue > 0">
+ <div class="actual-price">
+ <label class="mb-0 bid">@Loc["Products.Price.CurrentPrice"]:</label>
+ <span>{{PopupQuickViewVueModal.ProductPrice.HighestBid}}</span>
+ </div>
+ </template>
+ <template v-else>
+ <div class="actual-price">
+ <label class="mb-0">@Loc["Products.Price.StartPrice"]:</label>
+ <span>{{PopupQuickViewVueModal.ProductPrice.StartPrice}}</span>
+ </div>
+ </template>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.CatalogPrice !== null">
+ <div class="catalog-product-price col-12 px-0 mb-2">
+ <label class="col-form-label mb-0">@Loc["Products.Price.CatalogPrice"]:</label>
+ <span class="h6 mb-0">{{PopupQuickViewVueModal.ProductPrice.CatalogPrice}}</span>
+ </div>
+ </template>
+ <template v-if="!(PopupQuickViewVueModal.ProductPrice.IsAuction && PopupQuickViewVueModal.ProductPrice.DisableBuyButton)">
+ <div v-bind:class="{ 'product-price col-12 px-0 d-inline-flex align-items-center': (PopupQuickViewVueModal.ProductPrice.PriceWithDiscount !== null), 'non-discounted-price col-12 px-0 d-flex align-items-center': (PopupQuickViewVueModal.ProductPrice.PriceWithDiscount == null) }">
+ <span :class="'price-value-' + PopupQuickViewVueModal.ProductPrice.ProductId " v-bind:class="{ 'actual-price': (PopupQuickViewVueModal.ProductPrice.PriceWithDiscount == null) }">
+ <template v-if="PopupQuickViewVueModal.ProductPrice.IsAuction">
+ <strong class="actual-price bid">@Loc["Products.BuyNowPrice"]:</strong>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.PriceWithDiscount == null">
+ <span class="actual-price" v-html="PopupQuickViewVueModal.ProductPrice.Price"></span>
+ </template>
+ <template v-else>
+ <strong>{{Model.Price}}</strong>
+ </template>
+ </span>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.OldPrice !== null">
+ <div class="old-product-price">
+ <span class="old-price mx-2">{{PopupQuickViewVueModal.ProductPrice.OldPrice}}</span>
+ </div>
+ </template>
+ </div>
+ </template>
+ <template v-else>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.OldPrice !== null">
+ <div class="old-product-price">
+ <span class="old-price mx-2">{{Model.OldPrice}}</span>
+ </div>
+ </template>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.PriceWithDiscount !== null">
+ <div class="d-inline-flex align-items-center product-price discounted-price col-12 px-0">
+ <label class="mb-0 mx-2">@Loc["Products.Price.WithDiscount"]:</label>
+ <span :class="'your-price price-value-' + PopupQuickViewVueModal.ProductPrice.ProductId">
+ <strong class="actual-price" v-html="PopupQuickViewVueModal.ProductPrice.PriceWithDiscount"></strong>
+ </span>
+ <meta itemprop="price" content="PopupQuickViewVueModal.ProductPrice.PriceValue" :class="'your-price price-value-' + PopupQuickViewVueModal.ProductId" />
+ </div>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.BasePricePAngV !== null">
+ <div class="base-price-pangv ml-2">
+ {{PopupQuickViewVueModal.ProductPrice.BasePricePAngV}}
+ </div>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.CurrencyCode !== null">
+ <meta itemprop="priceCurrency" :content="PopupQuickViewVueModal.ProductPrice.CurrencyCode" />
+ </template>
+ <template v-if="PopupQuickViewVueModal.ProductPrice.PriceWithDiscount">
+ <meta itemprop="price" :content="PopupQuickViewVueModal.ProductPrice.PriceValue" />
+ </template>
+ </template>
+ </div>
+</template>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_ProductBundlesQV.cshtml b/src/Web/Grand.Web/Views/Shared/_ProductBundlesQV.cshtml
new file mode 100644
index 000000000..bad7a8952
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_ProductBundlesQV.cshtml
@@ -0,0 +1,32 @@
+<template v-if="PopupQuickViewVueModal.ProductBundleModels.length > 0">
+ <div class="product-bundle my-3">
+ <template v-for="item in PopupQuickViewVueModal.ProductBundleModels">
+ <div class="card mb-2">
+ <div class="row">
+ <div class="col-md-3 col-4 d-flex justify-content-center align-items-start pr-0">
+ <div class="img-fluid text-center">
+ <img class="img-fluid" :alt="item.DefaultPictureModel.AlternateText" :src="item.DefaultPictureModel.ImageUrl" :title="item.DefaultPictureModel.Title" />
+ </div>
+ </div>
+ <div class="col-md-9 col-8">
+ <div class="py-3">
+ <h6 class="card-title">{{item.Quantity}} x <a :href="'/' + item.SeName"> {{item.Name}} </a>({{item.Price}})</h6>
+ <p class="card-text small" v-html="item.ShortDescription"></p>
+ </div>
+ </div>
+ </div>
+ <template v-if="item.ProductAttributes.length > 0">
+ <div class="col-12">
+ <div class="attributes">
+ <table class="table">
+ <tr v-for="attribute in item.ProductAttributes">
+ <partial name="_AttributesQV" />
+ </tr>
+ </table>
+ </div>
+ </div>
+ </template>
+ </div>
+ </template>
+ </div>
+</template>
diff --git a/src/Web/Grand.Web/Views/Shared/_ProductLayout.QuickViewVue.cshtml b/src/Web/Grand.Web/Views/Shared/_ProductLayout.QuickViewVue.cshtml
new file mode 100644
index 000000000..83d5ed859
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_ProductLayout.QuickViewVue.cshtml
@@ -0,0 +1,222 @@
+<b-modal id="ModalQuickView" ref="ModalQuickView" :dark-theme="darkMode" @@shown="initReservationQV(), getLinkedProductsQV(PopupQuickViewVueModal.Id)" size="xl" centered hide-footer hide-header>
+ <template v-if="PopupQuickViewVueModal !== null">
+ <form method="post" id="product-details-form" :action="'/' + PopupQuickViewVueModal.SeName">
+ <div itemscope itemtype="http://schema.org/Product" :data-productid="PopupQuickViewVueModal.Id">
+ <div class="quick-view">
+ <div class="col-12 px-0">
+ <div class="form-row">
+ <div class="col-lg-5 col-12">
+ <div class="product-picture">
+ <img :src="PopupQuickViewVueModal.DefaultPictureModel.ImageUrl" :alt="PopupQuickViewVueModal.DefaultPictureModel.AlternateText" :title="PopupQuickViewVueModal.DefaultPictureModel.Title" class="img-fluid" id="main_qv_img" />
+ </div>
+ <div v-if="PopupQuickViewVueModal.PictureModels.length > 1" class="product-gallery">
+ <template v-for="picture in PopupQuickViewVueModal.PictureModels">
+ <img class="img-thumb" :src="picture.ThumbImageUrl" :alt="picture.AlternateText" :title="picture.Title" :data-img="picture.ImageUrl" @@click="document.getElementById('main_qv_img').src = $event.target.dataset.img" />
+ </template>
+ </div>
+ </div>
+ <div class="col-lg-7 col-12">
+ <div class="quick-view-overview">
+ <h2 class="qv-title">
+ <a :href="'/' + PopupQuickViewVueModal.SeName">
+ {{PopupQuickViewVueModal.Name}}
+ </a>
+ </h2>
+ <template v-if="PopupQuickViewVueModal.ProductReviewOverview.AllowCustomerReviews">
+ <b-form-rating :id="'rating-inline-overview-' + PopupQuickViewVueModal.Id" class="p-0" variant="warning" no-border size="sm" show-value precision="2" readonly inline :value="PopupQuickViewVueModal.ProductReviewOverview.RatingSum / PopupQuickViewVueModal.ProductReviewOverview.TotalReviews"></b-form-rating>
+ </template>
+ <a class="modal-close" @@click="$bvModal.hide('ModalQuickView')"><b-icon icon="x"></b-icon></a>
+ <template>
+ <div class="accordion" role="tablist">
+ <div role="tab">
+ <a v-b-toggle.accordion-qv-details class="btn btn-light collapse-button">@Loc["products.details"]</a>
+ </div>
+ <b-collapse class="collapse-panel" visible id="accordion-qv-details" accordion="accordion-qv-details" role="tabpanel">
+ <template v-if="PopupQuickViewVueModal.StockAvailability !== null">
+ <div class="stock">
+ <label class="col-form-label">@Loc["Products.Availability"]:</label>
+ <span class="value" :id="'stock-availability-value-' + PopupQuickViewVueModal.Id">
+ <link itemprop="availability" href="http://schema.org/InStock" />
+ <template v-if="PopupQuickViewVueModal.StockAvailability !== ''">
+ {{PopupQuickViewVueModal.StockAvailability}}
+ </template>
+ <template v-else-if="PopupQuickViewVueModal.DisplayDiscontinuedMessage">
+ @Loc["Products.Discontinued"]
+ </template>
+ </span>
+ </div>
+ </template>
+
+ @* PRODUCT BUNDLES *@
+
+ <partial name="_ProductBundlesQV" />
+
+ @* ATTRIBUTES *@
+
+ <template v-if="PopupQuickViewVueModal.ProductAttributes.length > 0">
+ <div class="attributes">
+ <table class="table">
+ <tr v-for="attribute in PopupQuickViewVueModal.ProductAttributes">
+ <partial name="_AttributesQV" />
+ </tr>
+ </table>
+ </div>
+ </template>
+
+ @* RESERVATIONS *@
+
+ <partial name="_ReservationInfoQV" />
+
+ @* GIFT VOUCHERS *@
+
+ <partial name="_GiftVoucherInfoQV" />
+
+ @* PRICES *@
+
+ <partial name="_PricesQV" />
+
+ @* AUCTION *@
+
+ <partial name="_AuctionInfoQV" />
+
+ @* ADD TO CART *@
+
+ <template v-if="PopupQuickViewVueModal.ProductType !== 10">
+ <partial name="_AddToCartQV" />
+ <template v-if="!PopupQuickViewVueModal.AddToCart.DisableWishlistButton || PopupQuickViewVueModal.CompareProductsEnabled || PopupQuickViewVueModal.EmailAFriendEnabled">
+ <div class="btn-group mt-2 mb-3 w-100">
+ <partial name="_AddToWishlistQV" />
+ <partial name="_ProductsComparisonQV" />
+ <partial name="_SendFriendQV" />
+ </div>
+ </template>
+ </template>
+
+ @* END OF ADD TO CART *@
+
+ </b-collapse>
+ <template v-if="PopupQuickViewVueModal.ProductSpecifications.length > 0">
+ <div role="tab">
+ <a v-b-toggle.accordion-qv-spec class="btn btn-light collapse-button">@Loc["Products.Specs"]</a>
+ </div>
+ <b-collapse class="collapse-panel" id="accordion-qv-spec" accordion="accordion-qv-spec" role="tabpanel">
+ <div class="spec-container table-responsive">
+ <table class="table data-table border-bottom-0">
+ <colgroup>
+ <col />
+ <col />
+ </colgroup>
+ <tbody>
+ <template v-for="item in PopupQuickViewVueModal.ProductSpecifications">
+ <tr class="spec">
+ <td class="border-bottom border-top-0">
+ <div class="spec-name">
+ {{item.SpecificationAttributeName}}
+ </div>
+ </td>
+ <td class="border-bottom border-top-0">
+ <div class="spec-value d-inline-flex w-100">
+ <template v-if="item.ColorSquaresRgb !== null">
+ <div class="color-squares mb-2 mr-2">
+ <span class="color-container" :title="item.ValueRaw">
+ <span class="color" v-bind:style="'background-color:' + item.ValueRaw">&nbsp;</span>
+ </span>
+ </div>
+ </template>
+ <template v-else>
+ <div class="mb-2 mr-2" v-html="item.ValueRaw"></div>
+ </template>
+ </div>
+ </td>
+ </tr>
+ </template>
+ </tbody>
+ </table>
+ </div>
+ </b-collapse>
+ </template>
+ <template v-if="PopupQuickViewVueModal.ShortDescription !== null">
+ <div role="tab">
+ <a v-b-toggle.accordion-qv-desc class="btn btn-light collapse-button">@Loc["product.description"]</a>
+ </div>
+ <b-collapse class="collapse-panel" id="accordion-qv-desc" accordion="accordion-qv-desc" role="tabpanel">
+ <div class="qv-description" v-html="PopupQuickViewVueModal.ShortDescription"></div>
+ </b-collapse>
+ </template>
+
+ @* ASSOCIATED PRODUCTS *@
+
+ <template v-if="PopupQuickViewVueModal.ProductType == 10">
+ <div role="tab">
+ <a v-b-toggle.accordion-qv-group class="btn btn-light collapse-button">@Loc["admin.catalog.products.associatedproducts"]</a>
+ </div>
+ <b-collapse visible class="collapse-panel" id="accordion-qv-group" accordion="accordion-qv-group" role="tabpanel">
+ <template v-if="PopupQuickViewVueModal.AssociatedProducts.length > 0">
+ <template v-for="variant in PopupQuickViewVueModal.AssociatedProducts">
+ <div class="card overflow-hidden associatedItem mb-3">
+ <div class="row" no-gutters>
+ <div class="col-lg-3 col-md-4">
+ <img :id="'main-product-img-' + variant.Id" :alt="variant.DefaultPictureModel.AlternateText" :src="variant.DefaultPictureModel.ImageUrl" class="rounded-0 img-fluid">
+ </div>
+ <div class="col-lg-9 col-md-8">
+ <div class="card-body overview" :title="variant.Name">
+
+ <!--short description-->
+
+ <div v-if="variant.ShortDescription !== null" class="short-description mb-3" v-html="variant.ShortDescription"></div>
+
+ <!--availability-->
+
+ <template v-if="variant.StockAvailability !== null">
+ <div class="stock">
+ <label class="col-form-label">@Loc["Products.Availability"]:</label>
+ <span class="value" :id="'stock-availability-value-' + variant.Id">
+ <link itemprop="availability" href="http://schema.org/InStock" />
+ {{variant.StockAvailability}}
+ </span>
+ </div>
+ </template>
+
+ <!--attributes-->
+ <template v-if="variant.ProductAttributes.length > 0">
+ <div class="attributes">
+ <table class="table">
+ <tr v-for="attribute in variant.ProductAttributes">
+ <partial name="_AttributesQV" />
+ </tr>
+ </table>
+ </div>
+ </template>
+
+ <!--price & add to cart-->
+
+ <partial name="_PricesGroupQV" />
+ <partial name="_AddToCartGroupQV" />
+
+ </div>
+ </div>
+ </div>
+ </div>
+ </template>
+ </template>
+ <template v-else>
+ <div class="no-associated-products alert alert-info">
+ @Loc["Products.NoAssociatedProducts"]
+ </div>
+ </template>
+ </b-collapse>
+ </template>
+
+ @* END OF ASSOCIATED PRODUCTS *@
+ </div>
+ </template>
+ </div>
+ </div>
+ <partial name="_LinkedProducts" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+ </template>
+</b-modal>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_ProductsComparisonQV.cshtml b/src/Web/Grand.Web/Views/Shared/_ProductsComparisonQV.cshtml
new file mode 100644
index 000000000..18ac82e83
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_ProductsComparisonQV.cshtml
@@ -0,0 +1,9 @@
+@{
+ var addtocomparelink = Url.RouteUrl("AddProductToCompare");
+}
+<template v-if="PopupQuickViewVueModal.CompareProductsEnabled">
+ <button class="btn btn-secondary add-to-compare-list-button mr-1" :onclick="'AxiosCart.addproducttocomparelist(`@addtocomparelink/' + PopupQuickViewVueModal.AddToCart.ProductId + '`);return false;'" v-b-tooltip.hover.bottom title="@Loc["Products.Compare.AddToCompareList"]">
+ <b-icon icon="shuffle"></b-icon>
+ <span class="sr-only">@Loc["Products.Compare.AddToCompareList"]</span>
+ </button>
+</template>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_ReservationInfoQV.cshtml b/src/Web/Grand.Web/Views/Shared/_ReservationInfoQV.cshtml
new file mode 100644
index 000000000..26c76642b
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_ReservationInfoQV.cshtml
@@ -0,0 +1,34 @@
+<template v-if="PopupQuickViewVueModal.ProductType == 20">
+ <div>
+ <template v-if="PopupQuickViewVueModal.Parameters.length > 0">
+ <div class="container" style="margin-left:-15px">
+ <label for="parameterDropdown" class="col-form-label">@Loc["Products.AdditionalParameter"]:</label>
+ <select class="custom-select form-control" name="parameterDropdown" id="parameterDropdown">
+ <template v-for="parameter in PopupQuickViewVueModal.Parameters">
+ <option :value="parameter.Value">{{parameter.Text}}</option>
+ </template>
+ </select>
+ </div>
+ </template>
+ <template v-if="PopupQuickViewVueModal.IntervalUnit == 10">
+ <div>
+ <h5>@Loc["Products.Reservation.DateFrom"]:</h5>
+ <input :name="'reservationDatepickerFrom_' + PopupQuickViewVueModal.Id" id="reservationDatepickerFrom" class="form-control datepicker" />
+ </div>
+ <div>
+ <h5>@Loc["Products.Reservation.DateTo"]:</h5>
+ <input :name="'reservationDatepickerTo_' + PopupQuickViewVueModal.Id" id="reservationDatepickerTo" class="form-control datepicker" />
+ </div>
+ </template>
+ <template v-else>
+ <div>
+ <h5>@Loc["Products.Reservation.Date"]:</h5>
+ <input id="reservationDatepicker" class="form-control datepicker" />
+ </div>
+ <div>
+ <h5 style="margin-top:10px">@Loc["Products.Reservation.Hour"]:</h5>
+ <div id="hoursDiv" class="d-inline-flex flex-wrap" data-toggle="buttons"></div>
+ </div>
+ </template>
+ </div>
+</template>
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Shared/_SendFriendQV.cshtml b/src/Web/Grand.Web/Views/Shared/_SendFriendQV.cshtml
new file mode 100644
index 000000000..fa8b41333
--- /dev/null
+++ b/src/Web/Grand.Web/Views/Shared/_SendFriendQV.cshtml
@@ -0,0 +1,9 @@
+@{
+ var sendfriend = @Url.RouteUrl("ProductEmailAFriend");
+}
+<template v-if="PopupQuickViewVueModal.EmailAFriendEnabled">
+ <a class="btn btn-secondary email-a-friend-button mr-1" :href="'@sendfriend/' + PopupQuickViewVueModal.Id" v-b-tooltip.hover.bottom title="@Loc["Products.EmailAFriend"]">
+ <b-icon icon="envelope"></b-icon>
+ <span class="sr-only">@Loc["Products.EmailAFriend"]</span>
+ </a>
+</template>
diff --git a/src/Web/Grand.Web/wwwroot/theme/css/catalog/catalog.rtl.css b/src/Web/Grand.Web/wwwroot/theme/css/catalog/catalog.rtl.css
index 63e72cf47..62dca0fb0 100644
--- a/src/Web/Grand.Web/wwwroot/theme/css/catalog/catalog.rtl.css
+++ b/src/Web/Grand.Web/wwwroot/theme/css/catalog/catalog.rtl.css
@@ -56,10 +56,10 @@
content: "";
position: absolute;
top: 0;
- left: -15px;
+ right: -15px;
width: 10px;
height: 105%;
- border-left: 1px solid #e7e7e7;
+ border-right: 1px solid #e7e7e7;
}
.generalLeftSide .block-category-navigation li.active > .sublist > li::before {
height: 105%;
@@ -100,7 +100,7 @@
margin: 0 10px 0 0;
}
.sort-container .col-form-label {
- margin: 0 5px 0 0;
+ margin: 0 0 0 5px;
font-weight: 500;
white-space: nowrap;
}
diff --git a/src/Web/Grand.Web/wwwroot/theme/css/common/common.css b/src/Web/Grand.Web/wwwroot/theme/css/common/common.css
index 7af79a308..ecc2287c9 100644
--- a/src/Web/Grand.Web/wwwroot/theme/css/common/common.css
+++ b/src/Web/Grand.Web/wwwroot/theme/css/common/common.css
@@ -457,6 +457,10 @@ dl, ol, ul {
top: 0;
right: 0;
width: auto;
+ height: 38px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
background-color: transparent;
border-color: transparent;
color: #212529;
@@ -479,6 +483,139 @@ dl, ol, ul {
#ModalAddToCart img {
background-color: #F8F9FB;
}
+[dark-theme="true"] .modal-close .b-icon.bi {
+ color: #fff;
+}
+
+/* quickview */
+
+.qv-title {
+ margin: 0;
+ font-size: 28px;
+ font-weight: 700;
+}
+.quick-view .accordion {
+ margin: 15px 0 0 0;
+}
+.quick-view-overview .prices {
+ margin: 0 0 15px 0;
+}
+.quick-view-overview .actual-price {
+ color: #1FB0C7;
+ font-size: 28px;
+ font-weight: 700;
+ line-height: 1;
+}
+.quick-view-overview .bid {
+ color: #000;
+ font-size: 22px;
+}
+.quick-view-overview .old-price {
+ color: #999;
+ font-size: 18px;
+ font-weight: 400;
+ text-decoration: line-through;
+ line-height: 1;
+}
+.quick-view-overview .qty-input,
+.quick-view-overview .qty-dropdown {
+ max-width: 65px;
+ min-width: 65px;
+ height: 45px;
+}
+.quick-view-overview .bid-input {
+ height: 45px;
+}
+.quick-view .add-to-cart-button {
+ font-size: 20px;
+ font-weight: 500;
+ height: 45px;
+ justify-content: center;
+ align-items: center;
+}
+.quick-view .attributes {
+ margin: 0 0 15px 0;
+ border: 1px solid #dee2e6;
+}
+.quick-view .attributes table {
+ margin: 0;
+ border: 0;
+}
+.quick-view .attributes table tr:first-child td {
+ border-top: 0;
+}
+.quick-view .attributes .attribute-name {
+ color: #333;
+ font-size: 16px;
+ font-weight: 500;
+}
+.quick-view .attributes .text-prompt {
+ color: #555;
+ font-size: 14px;
+ font-weight: 400;
+ width: 100%;
+ display: flex;
+}
+.quick-view-overview .accordion .btn.collapse-button {
+ display: inline-flex;
+ justify-content: space-between;
+ align-items: center;
+ width: 100%;
+ margin: 0 0 8px 0;
+ padding: 8px 12px;
+ font-size: 18px;
+ font-weight: 500;
+}
+.quick-view-overview .accordion .btn.collapse-button::after {
+ display: inline-block;
+ margin-left: .255em;
+ vertical-align: .255em;
+ content: "";
+ border-top: .4em solid;
+ border-right: .4em solid transparent;
+ border-bottom: 0;
+ border-left: .4em solid transparent;
+ -webkit-transition: all .2s ease-in-out;
+ transition: all .2s ease-in-out;
+}
+.quick-view-overview .accordion .btn.collapse-button.not-collapsed::after {
+ -webkit-transform: rotate( 180deg );
+ transform: rotate( 180deg );
+}
+.quick-view-overview .collapse-panel {
+ margin: 7px 0 15px 0;
+}
+.quick-view img {
+ background-color: #F8F9FB;
+}
+.quick-view .product-gallery {
+ display: inline-flex;
+ align-items: center;
+ flex-wrap: wrap;
+ margin: 10px 0;
+}
+.quick-view .product-gallery img {
+ margin: 0 10px 10px 0;
+ border: 1px solid #ddd;
+ cursor: pointer;
+}
+.quick-view .linked-product-grid {
+ border-top: 1px solid #ddd;
+ margin: 7.5px 0;
+ padding: 7.5px 0;
+}
+[dark-theme="true"] .quick-view .product-gallery img, [dark-theme="true"] .quick-view .linked-product-grid {
+ border-color: #666;
+}
+[dark-theme="true"] .quick-view img {
+ background-color: #2d3133;
+}
+[dark-theme="true"] .quick-view-overview .bid, [dark-theme="true"] .quick-view .attributes .attribute-name {
+ color: #fff;
+}
+[dark-theme="true"] .quick-view .attributes .text-prompt {
+ color: #ccc;
+}
/* color squares */
diff --git a/src/Web/Grand.Web/wwwroot/theme/css/common/common.rtl.css b/src/Web/Grand.Web/wwwroot/theme/css/common/common.rtl.css
index 190306f55..ab3e353ad 100644
--- a/src/Web/Grand.Web/wwwroot/theme/css/common/common.rtl.css
+++ b/src/Web/Grand.Web/wwwroot/theme/css/common/common.rtl.css
@@ -543,6 +543,10 @@ dl, ol, ul {
top: 0;
left: 0;
width: auto;
+ height: 38px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
background-color: transparent;
border-color: transparent;
color: #000;
@@ -562,6 +566,139 @@ dl, ol, ul {
height: 100%;
z-index: 1050;
}
+[dark-theme="true"] .modal-close .b-icon.bi {
+ color: #fff;
+}
+
+/* quickview */
+
+.quick-view {
+ text-align: right;
+}
+.qv-title {
+ margin: 0;
+ font-size: 28px;
+ font-weight: 700;
+}
+.quick-view .attributes {
+ margin: 0 0 15px 0;
+ border: 1px solid #dee2e6;
+}
+.quick-view .attributes table {
+ margin: 0;
+ border: 0;
+}
+.quick-view .attributes table tr:first-child td {
+ border-top: 0;
+}
+.quick-view .attributes .attribute-name {
+ color: #333;
+ font-size: 16px;
+ font-weight: 500;
+}
+.quick-view .attributes .text-prompt {
+ color: #555;
+ font-size: 14px;
+ font-weight: 400;
+ width: 100%;
+ display: flex;
+}
+.quick-view-overview .prices {
+ margin: 0 0 15px 0;
+}
+.quick-view-overview .actual-price {
+ color: #1FB0C7;
+ font-size: 28px;
+ font-weight: 700;
+ line-height: 1;
+}
+.quick-view-overview .bid {
+ color: #000;
+ font-size: 22px;
+}
+.quick-view-overview .old-price {
+ color: #999;
+ font-size: 18px;
+ font-weight: 400;
+ text-decoration: line-through;
+ line-height: 1;
+}
+.quick-view-overview .qty-input,
+.quick-view-overview .qty-dropdown {
+ max-width: 65px;
+ min-width: 65px;
+ height: 45px;
+}
+.quick-view-overview .bid-input {
+ height: 45px;
+}
+.quick-view .add-to-cart-button {
+ font-size: 20px;
+ font-weight: 500;
+ height: 45px;
+ justify-content: center;
+ align-items: center;
+}
+.quick-view-overview .accordion .btn.collapse-button {
+ display: inline-flex;
+ justify-content: space-between;
+ align-items: center;
+ width: 100%;
+ margin: 0 0 8px 0;
+ padding: 8px 12px;
+ font-size: 18px;
+ font-weight: 500;
+}
+.quick-view-overview .accordion .btn.collapse-button::after {
+ display: inline-block;
+ margin-left: .255em;
+ vertical-align: .255em;
+ content: "";
+ border-top: .4em solid;
+ border-right: .4em solid transparent;
+ border-bottom: 0;
+ border-left: .4em solid transparent;
+ -webkit-transition: all .2s ease-in-out;
+ transition: all .2s ease-in-out;
+}
+.quick-view-overview .accordion .btn.collapse-button.not-collapsed::after {
+ -webkit-transform: rotate( 180deg );
+ transform: rotate( 180deg );
+}
+.quick-view-overview .collapse-panel {
+ margin: 7px 0 15px 0;
+}
+.quick-view img {
+ background-color: #F8F9FB;
+}
+.quick-view .product-gallery {
+ display: inline-flex;
+ align-items: center;
+ flex-wrap: wrap;
+ margin: 10px 0;
+}
+.quick-view .product-gallery img {
+ margin: 0 0 10px 10px;
+ border: 1px solid #ddd;
+ cursor: pointer;
+}
+.quick-view .linked-product-grid {
+ border-top: 1px solid #ddd;
+ margin: 7.5px 0;
+ padding: 7.5px 0;
+}
+[dark-theme="true"] .quick-view .product-gallery img, [dark-theme="true"] .quick-view .linked-product-grid {
+ border-color: #666;
+}
+[dark-theme="true"] .quick-view img {
+ background-color: #2d3133;
+}
+[dark-theme="true"] .quick-view-overview .bid, [dark-theme="true"] .quick-view .attributes .attribute-name {
+ color: #fff;
+}
+[dark-theme="true"] .quick-view .attributes .text-prompt {
+ color: #ccc;
+}
/* color squares */
diff --git a/src/Web/Grand.Web/wwwroot/theme/script/app.js b/src/Web/Grand.Web/wwwroot/theme/script/app.js
index 7b4c29a01..9b697cfc0 100644
--- a/src/Web/Grand.Web/wwwroot/theme/script/app.js
+++ b/src/Web/Grand.Web/wwwroot/theme/script/app.js
@@ -16,6 +16,11 @@
searchproducts: null,
flycartfirstload: true,
PopupAddToCartVueModal: null,
+ PopupQuickViewVueModal: null,
+ index: null,
+ RelatedProducts: null,
+ SimilarProducts: null,
+ ProductsAlsoPurchased : null,
}
},
props: {
@@ -151,5 +156,150 @@
isMobile: function () {
return (typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1);
},
- }
+ attrchange: function (productId, hasCondition, loadPicture) {
+ var form = document.getElementById('product-details-form');
+ var data = new FormData(form);
+ axios({
+ url: '/product/productdetails_attributechange?productId=' + productId + '&validateAttributeConditions=' + hasCondition + '&loadPicture=' + loadPicture,
+ data: data,
+ method: 'post',
+ params: { product: productId },
+ }).then(function (response) {
+ if (response.data.price) {
+ vm.PopupQuickViewVueModal.ProductPrice.Price = response.data.price;
+ }
+ if (response.data.sku) {
+ vm.PopupQuickViewVueModal.Sku = response.data.sku;
+ }
+ if (response.data.mpn) {
+ vm.PopupQuickViewVueModal.Mpn = response.data.mpn;
+ }
+ if (response.data.gtin) {
+ vm.PopupQuickViewVueModal.Gtin = response.data.gtin;
+ }
+ if (response.data.stockAvailability) {
+ vm.PopupQuickViewVueModal.StockAvailability = response.data.stockAvailability;
+ }
+ if (response.data.outOfStockSubscription) {
+ //var element = document.querySelector('#out-of-stock-subscribe-' + productId);
+ //if (element)
+ // element.style.display = "block";
+ }
+ if (response.data.outOfStockSubscription == false) {
+ //var element = document.querySelector('#out-of-stock-subscribe-' + productId);
+ //if (element) {
+ // element.style.display = "none";
+ //}
+ }
+ if (response.data.buttonTextOutOfStockSubscription) {
+ PopupQuickViewVueModal.StockAvailability = response.data.stockAvailability;
+ //var element = document.querySelector('#out-of-stock-subscribe-' + productId);
+ //if (element)
+ // element.value = response.data.buttonTextOutOfStockSubscription;
+ }
+ if (response.data.enabledattributemappingids) {
+ for (var i = 0; i < response.data.enabledattributemappingids.length; i++) {
+ document.querySelector('#product_attribute_label_' + response.data.enabledattributemappingids[i]).style.display = "table-cell";
+ document.querySelector('#product_attribute_input_' + response.data.enabledattributemappingids[i]).style.display = "table-cell";
+ }
+ }
+ if (response.data.disabledattributemappingids) {
+ for (var i = 0; i < response.data.disabledattributemappingids.length; i++) {
+ document.querySelector('#product_attribute_label_' + response.data.disabledattributemappingids[i]).style.display = "none";
+ document.querySelector('#product_attribute_input_' + response.data.disabledattributemappingids[i]).style.display = "none";
+ }
+ }
+ if (response.data.pictureDefaultSizeUrl !== null) {
+ vm.PopupQuickViewVueModal.DefaultPictureModel.ImageUrl = response.data.pictureDefaultSizeUrl;
+ }
+ });
+ },
+ uploadFile: function (e) {
+ var formData = new FormData();
+ var imagefile = e;
+ var url = imagefile.getAttribute('data-url');
+ formData.append("image", qqfile.files[0]);
+ axios.post(url, formData, {
+ headers: {
+ 'Content-Type': 'multipart/form-data'
+ }
+ }).then(function (response) {
+ if (response.data.success) {
+ var message = response.data.message;
+ var downloadGuid = response.data.downloadGuid;
+ var downloadUrl = response.data.downloadUrl;
+ var downloadBtn = document.querySelector('.download-file');
+ var messageContainer = document.getElementById('download-message');
+
+ e.setAttribute('qq-button-id', downloadGuid);
+ document.querySelector('.hidden-upload-input').value = downloadGuid;
+
+ messageContainer.style.display = "block";
+ messageContainer.classList.remove('alert-danger');
+ messageContainer.classList.add('alert-info');
+ messageContainer.innerText = message;
+
+ downloadBtn.style.display = "block";
+ downloadBtn.children[0].setAttribute('href', downloadUrl);
+
+ } else {
+ var message = response.data.message;
+ var messageContainer = document.getElementById('download-message');
+ messageContainer.style.display = "block";
+ messageContainer.classList.remove('alert-info');
+ messageContainer.classList.add('alert-danger');
+ messageContainer.innerText = message;
+ }
+ })
+ },
+ initReservationQV: function () {
+ var productId = vm.PopupQuickViewVueModal.Id;
+ var fullDate = vm.PopupQuickViewVueModal.ReservationFullDate;
+ var year = vm.PopupQuickViewVueModal.ReservationYear;
+ var month = vm.PopupQuickViewVueModal.ReservationMonth;
+ Reservation.init(fullDate, year, month, "No available reservations", "/Product/GetDatesForMonth", productId, "/product/productdetails_attributechange?productId=" + productId + "&validateAttributeConditions=False");
+ },
+ getLinkedProductsQV: function (id) {
+ var data = { productId: id };
+ axios({
+ url: '/Component/Index',
+ method: 'post',
+ params: { "name": "RelatedProducts" },
+ data: JSON.stringify(data),
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json',
+ 'X-Response-View': 'Json'
+ }
+ }).then(function (response) {
+ vm.RelatedProducts = response.data;
+ });
+ axios({
+ url: '/Component/Index',
+ method: 'post',
+ params: { "name": "SimilarProducts" },
+ data: JSON.stringify(data),
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json',
+ 'X-Response-View': 'Json'
+ }
+ }).then(function (response) {
+ vm.SimilarProducts = response.data;
+ });
+ axios({
+ url: '/Component/Index',
+ method: 'post',
+ params: { "name": "ProductsAlsoPurchased" },
+ data: JSON.stringify(data),
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json',
+ 'X-Response-View': 'Json'
+ }
+ }).then(function (response) {
+ vm.ProductsAlsoPurchased = response.data;
+ });
+ }
+ },
});
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 a0869923e..fcb90f110 100644
--- a/src/Web/Grand.Web/wwwroot/theme/script/public.axios.js
+++ b/src/Web/Grand.Web/wwwroot/theme/script/public.axios.js
@@ -142,13 +142,34 @@ var AxiosCart = {
}
if (response.data.product) {
if (response.data.success == true) {
- displayPopupQuickView(response.data.html);
+
+ console.log(response.data.model)
+ vm.PopupQuickViewVueModal = response.data.model;
+
+ Object.assign(vm.PopupQuickViewVueModal, { RelatedProducts: [] });
+
+ vm.$refs['ModalQuickView'].show();
+
+ if (response.data.model.ProductType == 20) {
+
+ var fullDate = new Date(response.data.model.StartDate).toLocaleDateString('en-US');
+ var year = new Date(response.data.model.StartDate).getFullYear();
+ var month = new Date(response.data.model.StartDate).getUTCMonth() + 1;
+
+
+ Object.assign(vm.PopupQuickViewVueModal, { ReservationFullDate: fullDate });
+ Object.assign(vm.PopupQuickViewVueModal, { ReservationYear: year });
+ Object.assign(vm.PopupQuickViewVueModal, { ReservationMonth: month });
+
+ }
+
}
}
if (response.data.message) {
if (response.data.success == true) {
//success
vm.PopupAddToCartVueModal = response.data.model;
+ vm.$refs['ModalQuickView'].hide();
vm.$refs['ModalAddToCart'].show();
if (response.data.refreshreservation == true) {
var param = "";
diff --git a/src/Web/Grand.Web/wwwroot/theme/script/public.common.js b/src/Web/Grand.Web/wwwroot/theme/script/public.common.js
index 68b04b38c..4eda50b5a 100644
--- a/src/Web/Grand.Web/wwwroot/theme/script/public.common.js
+++ b/src/Web/Grand.Web/wwwroot/theme/script/public.common.js
@@ -89,81 +89,6 @@ function displayPopupNewsletterCategory(html) {
});
}
-function displayPopupQuickView(html) {
- document.querySelector('.modal-place').innerHTML = html;
- new Vue({
- el: '#ModalQuickView',
- data: {
- template: null,
- hover: false,
- active: false,
- darkMode: false,
- },
- render: function (createElement) {
- if (!this.template) {
- return createElement('b-overlay', {
- attrs: { show: 'true' }
- });
- } else {
- return this.template();
- }
- },
- methods: {
- showModal: function () {
- this.$refs['ModalQuickView'].show()
- },
- onShown: function () {
- runScripts(document.querySelector('.script-tag'))
- },
- productImage: function (event) {
- var Imagesrc = event.target.parentElement.getAttribute('data-href');
- var Image = event.target.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.querySelectorAll(".img-second")[0];
- Image.setAttribute('src', Imagesrc);
- },
- showModalOutOfStock: function () {
- this.$refs['out-of-stock'].show()
- },
- validateBeforeClick: function (event) {
- this.$validator.validateAll().then((result) => {
- if (result) {
- var callFunction = event.srcElement.getAttribute('data-click');
- eval(callFunction)
- return
- }
- });
- },
- changeImg: function (event){
- var img = event.srcElement.getAttribute('data-src');
- var mainImg = document.querySelector('#ModalQuickView .gallery .main-image');
- mainImg.setAttribute('src', img);
- },
- isMobile: function () {
- return (typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1);
- }
- },
- watch: {
- darkMode: function (newValue) {
- localStorage.darkMode = newValue;
- }
- },
- mounted: function () {
- var self = this;
- self.template = Vue.compile(html).render;
- this.$root.$on('bv::modal::show', (bvEvent, modalId) => {
- if (modalId == 'ModalQuickView') {
- if (document.querySelector('#ModalQuickView___BV_modal_outer_') !== null) {
- document.querySelector('#ModalQuickView___BV_modal_outer_').remove();
- }
- }
- });
- if (localStorage.darkMode == "true") this.darkMode = true;
- },
- updated: function () {
- this.showModal();
- }
- });
-}
-
function displayBarNotification(message, messagetype, timeout) {
if (messagetype == 'error') {
diff --git a/src/Web/Grand.Web/wwwroot/theme/script/public.reservation.js b/src/Web/Grand.Web/wwwroot/theme/script/public.reservation.js
index 119638653..ffcce1219 100644
--- a/src/Web/Grand.Web/wwwroot/theme/script/public.reservation.js
+++ b/src/Web/Grand.Web/wwwroot/theme/script/public.reservation.js
@@ -370,7 +370,7 @@
document.querySelector("#gtin-" + Reservation.productId).innerText = response.data.gtin;
}
if (response.data.price) {
- document.querySelector(".price-value-" + Reservation.productId).innerText = response.data.price;
+ document.querySelector(".price-value-" + Reservation.productId + " .actual-price").innerText = response.data.price;
}
})
}