Something went wrong. Try again.
An E-Commerce Website built using Node.js, Express, Express Generator, MongoDB, and HandleBars Template Engine. Scope - Single Admin/Vendor…
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657<section> <div class="container mb-5">
<div class="row"> <a href="admin/add-product" class="btn btn-success my-4 ml-auto m-3 px-5 py-2">Add Product</a> </div>
<table class="table" id="productTable"> <thead> <tr> <th style="width: 50px;" scope="col">SI No:</th> <th style="width: 180px;" scope="col">Product Name</th> <th style="width: 120px;" scope="col">Category</th> <th style="width: 80px;" scope="col">Price</th> <th scope="col">Description</th> <th class="px-5" scope="col">Image</th> <th scope="col">Options</th> </tr> </thead> <tbody> {{#each products}} <tr> <td style="width: 50px;" class="count"></td> <td style="width: 180px;">{{this.Name}}</td> <td style="width: 120px;">{{this.Category}}</td> <td style="width: 80px;">{{this.Price}}</td> <td>{{this.Description}}</td> <td class="px-5"><img style="height: 55px; width: auto;" src="/product-images/{{this._id}}.jpg"></td> <td style="width: 150px;"> <a class="mx-2 btn btn-primary" href="/admin/edit-product/{{this._id}}">Edit</a> <a class="btn btn-danger" href="/admin/delete-product/{{this._id}}" onclick="return confirm('Do you want to delete {{this.Name}} ?')">Delete</a> </td> </tr> {{/each}}
</tbody> </table>
</div></section>
<script> $(document).ready( function () { $('#productTable').DataTable(); });</script>
<style> table { counter-reset: section; }
.count:before { counter-increment: section; content: counter(section); }</style>