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.

quick view - minor changes

DanielŻuławski5a27b6db4097
diff --git a/src/Web/Grand.Web/Views/Shared/_LinkedProducts.cshtml b/src/Web/Grand.Web/Views/Shared/_LinkedProducts.cshtml
index 766fb07fb..c3a6b79db 100644
--- a/src/Web/Grand.Web/Views/Shared/_LinkedProducts.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/_LinkedProducts.cshtml
@@ -1,28 +1,4 @@
-<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">
+<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">
diff --git a/src/Web/Grand.Web/wwwroot/theme/script/app.js b/src/Web/Grand.Web/wwwroot/theme/script/app.js
index 9b697cfc0..a1767a316 100644
--- a/src/Web/Grand.Web/wwwroot/theme/script/app.js
+++ b/src/Web/Grand.Web/wwwroot/theme/script/app.js
@@ -19,8 +19,6 @@
PopupQuickViewVueModal: null,
index: null,
RelatedProducts: null,
- SimilarProducts: null,
- ProductsAlsoPurchased : null,
}
},
props: {
@@ -44,6 +42,9 @@
darkMode: function (newValue) {
localStorage.darkMode = newValue;
},
+ PopupQuickViewVueModal: function () {
+ vm.getLinkedProductsQV(vm.PopupQuickViewVueModal.Id);
+ }
},
methods: {
updateFly: function () {
@@ -180,22 +181,8 @@
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++) {
@@ -274,32 +261,6 @@
}).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;
- });
}
},
});