About
This small application demonstrates how Velosity can be integrated into your website using the Velosity API to enable your customers to price your configurable products themselves!
Only 3 API endpoints are required (API documentation):
Only 3 API endpoints are required (API documentation):
- Products Get All (GET). Returns a JSON array of Products. These would be displayed on your website as buttons or links, passing the ProductID to the Configure view/page
- Pages [By ProductID] (GET). Returns a JSON array of DefinitionPageModel objects. Each Page contains the Attributes that are shown on the Page. The Attributes are the choices the customer would make and can be DROPDOWN or ENTRY
- Configure (POST). A JSON object of the Configuration is sent to the API and Velosty returns a JSON object of the Configuration. The returned Configuration can be used to update the Configure UI on your website
Code
<div class="card">
<div class="card-header bg-light text-black">
<h3>Products</h3>
</div>
<div class="card-body">
<div class="row">
@foreach (ProductModel product in Model.Products)
{
<div class="col-3 m-5">
<a href="/Products/@product.ProductID/Configure">
<button class="btn btn-outline-primary btn-lg">@product.ProductName</button>
</a>
</div>
}
</div>
</div>
</div>
;