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.

Plugin Theme.Modern - minor changes

support8a4d3b65c1cf
diff --git a/src/Plugins/Theme.Modern/Views/Modern/Catalog/BrandLayout.GridOrLines.cshtml b/src/Plugins/Theme.Modern/Views/Modern/Catalog/BrandLayout.GridOrLines.cshtml
index 40f88034f..8fad7b6c3 100644
--- a/src/Plugins/Theme.Modern/Views/Modern/Catalog/BrandLayout.GridOrLines.cshtml
+++ b/src/Plugins/Theme.Modern/Views/Modern/Catalog/BrandLayout.GridOrLines.cshtml
@@ -14,6 +14,7 @@
var collectionUrl = Url.RouteUrl("Brand", new { Model.SeName }, this.Url.ActionContext.HttpContext.Request.Scheme);
pagebuilder.AddCanonicalUrlParts(collectionUrl);
}
+
<script asp-location="Header" asp-src="/theme/script/catalog.js"></script>
}
@@ -28,45 +29,48 @@
<template v-if="catalog.Model.Description !== null">
<div v-html="catalog.Model.Description"></div>
</template>
- <h1 class="generalTitle h2"><div>{{catalog.Model.Name}}</div></h1>
+ <h1 class="generalTitle h2">
+ <div>{{catalog.Model.Name}}</div>
+ </h1>
@await Component.InvokeAsync("Widget", new { widgetZone = "branddetails_top", additionalData = Model.Id })
@*Rendering description section*@
@await Component.InvokeAsync("Widget", new { widgetZone = "branddetails_before_featured_products", additionalData = Model.Id })
@*Rendering featured products section*@
@await Component.InvokeAsync("Widget", new { widgetZone = "branddetails_after_featured_products", additionalData = Model.Id })
<div id="catalog-products">
- @await Component.InvokeAsync("Widget", new { widgetZone = "branddetails_before_filters", additionalData = Model.Id })
- <partial name="Partials/Selectors" />
- <template v-if="catalog.Model.Products.length > 0">
- <template v-if="catalog.Model.PagingFilteringContext.ViewMode == 'grid'">
- <b-col cols="12" class="product-grid standard px-0">
- <b-form-row>
- <template :key="Model.Id" v-for="Model in catalog.Model.Products">
- <b-col lg="4" sm="6" cols="6" class="product-container new-col-6 mb-2">
- <product-box-vue :Model="Model"></product-box-vue>
- </b-col>
- </template>
- </b-form-row>
- </b-col>
- </template>
- <template v-else>
- <div class="product-list">
- <b-col cols="12">
- <b-row>
+ <template v-if="catalog.Model !== undefined">
+ <partial name="Partials/Selectors"/>
+ <template v-if="catalog.Model.Products.length > 0">
+ <template v-if="catalog.Model.PagingFilteringContext.ViewMode == 'grid'">
+ <b-col cols="12" class="product-grid standard px-0">
+ <b-form-row>
<template :key="Model.Id" v-for="Model in catalog.Model.Products">
- <product-box-list-vue :Model="Model"></product-box-list-vue>
+ <b-col lg="3" sm="4" cols="6" class="product-container px-0 mb-2">
+ <product-box-vue :Model="Model"></product-box-vue>
+ </b-col>
</template>
- </b-row>
+ </b-form-row>
</b-col>
- </div>
+ </template>
+ <template v-else>
+ <div class="product-list">
+ <b-col cols="12">
+ <b-row>
+ <template :key="Model.Id" v-for="Model in catalog.Model.Products">
+ <product-box-list-vue :Model="Model"></product-box-list-vue>
+ </template>
+ </b-row>
+ </b-col>
+ </div>
+ </template>
+ @*<partial name="Partials/Pagination" />*@
+ <partial name="Partials/ScrollPagination"/>
+ </template>
+ <template v-else>
+ <b-alert variant="info" show class="my-3">
+ @Loc["search.noresultstext"]
+ </b-alert>
</template>
- @*<partial name="Partials/Pagination" />*@
- <partial name="Partials/ScrollPagination" />
- </template>
- <template v-else>
- <b-alert variant="info" show class="my-3">
- @Loc["search.noresultstext"]
- </b-alert>
</template>
</div>
@*Rendering bottom description section*@
@@ -79,11 +83,12 @@
</b-skeleton-wrapper>
@section filters
- {
+{
@*Rendering filtering section*@
@*@if (Model.PagingFilteringContext.SpecificationFilter.Enabled)
{
<partial name="Partials/Filtering" />
}*@
}
-<partial name="Partials/ModelScript" model="@Json.Serialize(Model)" />
\ No newline at end of file
+
+<partial name="Partials/ModelScript" model="@Json.Serialize(Model)"/>
\ No newline at end of file
diff --git a/src/Plugins/Theme.Modern/Views/Modern/Catalog/CollectionLayout.GridOrLines.cshtml b/src/Plugins/Theme.Modern/Views/Modern/Catalog/CollectionLayout.GridOrLines.cshtml
index 99bcc93b6..368ae7bca 100644
--- a/src/Plugins/Theme.Modern/Views/Modern/Catalog/CollectionLayout.GridOrLines.cshtml
+++ b/src/Plugins/Theme.Modern/Views/Modern/Catalog/CollectionLayout.GridOrLines.cshtml
@@ -47,40 +47,42 @@
</template>
@await Component.InvokeAsync("Widget", new { widgetZone = "collectiondetails_after_featured_products", additionalData = Model.Id })
<div id="catalog-products">
- @await Component.InvokeAsync("Widget", new { widgetZone = "collectiondetails_before_filters", additionalData = Model.Id })
- <partial name="Partials/Selectors" />
- <template v-if="catalog.Model.Products.length > 0">
- <template v-if="catalog.Model.PagingFilteringContext.ViewMode == 'grid'">
- <b-col cols="12" class="product-grid px-0">
- <b-form-row>
- <template :key="Model.Id" v-for="Model in catalog.Model.Products">
- <b-col lg="4" sm="6" cols="6" class="product-container new-col-6 mb-2">
- <product-box-vue :Model="Model"></product-box-vue>
+ @await Component.InvokeAsync("Widget", new { widgetZone = "collectiondetails_before_filters", additionalData = Model.Id })
+ <template v-if="catalog.Model !== undefined">
+ <partial name="Partials/Selectors" />
+ <template v-if="catalog.Model.Products.length > 0">
+ <template v-if="catalog.Model.PagingFilteringContext.ViewMode == 'grid'">
+ <b-col cols="12" class="product-grid standard px-0">
+ <b-form-row>
+ <template :key="Model.Id" v-for="Model in catalog.Model.Products">
+ <b-col lg="3" sm="4" cols="6" class="product-container px-0 mb-2">
+ <product-box-vue :Model="Model"></product-box-vue>
+ </b-col>
+ </template>
+ </b-form-row>
+ </b-col>
+ </template>
+ <template v-else>
+ <div class="product-list">
+ <b-col cols="12">
+ <b-row>
+ <template :key="Model.Id" v-for="Model in catalog.Model.Products">
+ <product-box-list-vue :Model="Model"></product-box-list-vue>
+ </template>
+ </b-row>
</b-col>
- </template>
- </b-form-row>
- </b-col>
- </template>
- <template v-else>
- <div class="product-list">
- <b-col cols="12">
- <b-row>
- <template v-for="Model in catalog.Model.Products">
- <partial name="Partials/ProductBoxListVue" />
- </template>
- </b-row>
- </b-col>
- </div>
+ </div>
+ </template>
+ @*<partial name="Partials/Pagination" />*@
+ <partial name="Partials/ScrollPagination" />
+ </template>
+ <template v-else>
+ <b-alert variant="info" show class="my-3">
+ @Loc["search.noresultstext"]
+ </b-alert>
+ </template>
</template>
- @*<partial name="Partials/Pagination" />*@
- <partial name="Partials/ScrollPagination" />
- </template>
- <template v-else>
- <b-alert variant="info" show class="my-3">
- @Loc["search.noresultstext"]
- </b-alert>
- </template>
- </div>
+ </div>
@*Rendering bottom description section*@
<template v-if="catalog.Model.BottomDescription !== null">
diff --git a/src/Plugins/Theme.Modern/Views/Modern/Catalog/Partials/ScrollPagination.cshtml b/src/Plugins/Theme.Modern/Views/Modern/Catalog/Partials/ScrollPagination.cshtml
index 91c6fb993..1e4f2e8a8 100644
--- a/src/Plugins/Theme.Modern/Views/Modern/Catalog/Partials/ScrollPagination.cshtml
+++ b/src/Plugins/Theme.Modern/Views/Modern/Catalog/Partials/ScrollPagination.cshtml
@@ -36,7 +36,7 @@
}
},
pageScroll() {
- let catalogProdH = document.getElementById("catalog-products").scrollHeight * .5;
+ let catalogProdH = document.getElementById("catalog-products").scrollHeight * .3;
let TotalPages = catalog.Model.PagingFilteringContext.TotalPages;
let PageNumber = catalog.Model.PagingFilteringContext.PageNumber;
if (window.pageYOffset >= catalogProdH && PageNumber < TotalPages && !this.stop) {