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.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
@model CustomerModel
@{
var area = ViewContext.RouteData.Values["area"]?.ToString();
<div class="grand-card">
<div class="grand-card__header">
<h2 class="grand-card__title">@Html.Raw(Loc["Admin.Customers.Customers.PersonalizedProduct"])</h2>
<a id="btnAddNewPersonalizedProduct" href="@(Url.Action("ProductAddPopup", "Customer", new { customerId = Model.Id, btnId = "btnRefreshPersonalizedProducts", formId = "customer-form", personalized = "true", area = area }))" class="btn btn-outline-secondary btn-sm"><i class="bi bi-plus-lg"></i> @Loc["Admin.Customers.Customers.PersonalizedProduct.AddNew"]</a>
<input type="submit" id="btnRefreshPersonalizedProducts" style="display: none"/>
</div>
<partial name="Partials/WidgetZone.ProductTop" model="Model"/>
<div class="grand-card__body grand-card__body--flush">
<admin-grid id="personalizedproduct-grid"
read-url="@Url.Action("PersonalizedProducts", "Customer", new { customerId = Model.Id, area = area })"
update-url="@Url.Action("UpdatePersonalizedProduct", "Customer", new { area = area })"
destroy-url="@Url.Action("DeletePersonalizedProduct", "Customer", new { area = area })"
auto-bind="false"
edit-mode="Inline"
reload-after-save="false">
<grid-column field="ProductName" title="@Loc["Admin.Customers.Customers.PersonalizedProduct.ProductName"]" width="300">
<cell-template>
<a class="text-decoration-none" href="@Url.Action("Edit", "Product", new { area = area })/{{ ProductId }}" target="_blank">{{ ProductName }}</a>
</cell-template>
</grid-column>
<grid-column field="DisplayOrder" title="@Loc["Admin.Customers.Customers.PersonalizedProduct.DisplayOrder"]" width="100" editor="Integer"/>
<grid-commands edit="true" destroy="true" width="200"/>
</admin-grid>
</div>
<partial name="Partials/WidgetZone.ProductBottom" model="Model"/>
</div>
<script>
$(document).ready(function () {
$('#btnAddNewPersonalizedProduct').magnificPopup({
type: 'ajax',
settings: { cache: false, async: false },
midClick: true,
callbacks: {
parseAjax: function (mfpResponse) {
mfpResponse.data = $('<div></div>').html(mfpResponse.data);
},
ajaxContentAdded: function () {
$('.mfp-wrap').removeAttr('tabindex');
}
}
});
});
</script>
<script>
$(document).ready(function () {
$('#btnRefreshPersonalizedProducts').click(function () {
//refresh grid
var grid = GrandAdmin.grids.get("#personalizedproduct-grid");
grid.dataSource.read();
//return false to don't reload a page
return false;
});
});
</script>
}