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 PaymentMethodRestrictionModel
<admin-card>
<div class="note note-info">
@Loc["Admin.Configuration.Payment.MethodRestrictions.DescriptionShipping"]
</div>
@if (Model.AvailablePaymentMethods.Count == 0)
{
<text>No payment methods installed</text>
}
else if (Model.AvailableShippingMethods.Count == 0)
{
<text>No shipping method available</text>
}
else
{
<script>
$(document).ready(function () {
@foreach (var pm in Model.AvailablePaymentMethods)
{
var systemNameWithoutDot = pm.SystemName.Replace(".", "");
<text>
$('#selectshipall-@(systemNameWithoutDot)').click(function () {
$('.restrictship_@(systemNameWithoutDot)').prop('checked', $(this).is(':checked')).change();
});
</text>
}
});
</script>
<div class="table-responsive">
<table class="table table-sm table-hover align-middle mb-0">
<tbody>
<tr>
<th scope="col">
<strong>@Loc["Admin.Configuration.Payment.MethodRestrictions.Shipping"]</strong>
</th>
@foreach (var pm in Model.AvailablePaymentMethods)
{
var systemNameWithoutDot = pm.SystemName.Replace(".", "");
<th scope="col" class="text-center">
<strong>@pm.FriendlyName</strong>
<br/>
<input class="form-check-input" type="checkbox" id="selectshipall-@(systemNameWithoutDot)"/>
</th>
}
</tr>
@foreach (var c in Model.AvailableShippingMethods)
{
<tr>
<td>
<span>@c.Name</span>
</td>
@foreach (var pm in Model.AvailablePaymentMethods)
{
var resticted = Model.RestictedShipping.ContainsKey(pm.SystemName) && Model.RestictedShipping[pm.SystemName][c.Name];
var systemNameWithoutDot = pm.SystemName.Replace(".", "");
<td class="text-center">
<input class="restrictship_@(systemNameWithoutDot) form-check-input" type="checkbox" value="@(c.Name)" name="restrictship_@(systemNameWithoutDot)" @(resticted ? " checked=checked" : null)/>
</td>
}
</tr>
}
</tbody>
</table>
</div>
}
</admin-card>