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 IList<ProductDetailsModel.ProductAttributeModel>
@{
var bundleProductId = ViewData["BundleProductId"]?.ToString();
var productId = ViewData["ProductId"]?.ToString();
var componentName = $"product-attributes-bundle-{productId}";
var containerId = $"product-attributes-bundle-container-{productId}";
}
@*The change wiring used to be *generated JavaScript*: a StringBuilder emitted one
addEventListener per attribute control and the component evaluated the result in
mounted(). vueapp/src/behaviours/product-attributes-bundle.js delegates instead.*@
<script type="application/json" data-grand-vm="productAttributesBundle">@Json.Serialize(new {
componentName,
templateId = "#product-attributes-bundle",
containerId,
attributes = Model
})</script>
<div id="@containerId"
data-bundle-product="@bundleProductId"
data-attribute-route="@Url.Action("productdetails_attributechange", "product", new { productId = bundleProductId, loadPicture = true })">
<component :is="'@componentName'"></component>
</div>