I have a dynamically created table. Means the header is fixed and the row data will append dynamically after certain ajax call. My question is how to save quantity value with product_id (which is the <tr>
id) in database?
<tr>
<th></th>
<th>Product Name</th>
<th>Unit Price</th>
<th>Quantity</th>
<th>Total </th>
</tr>
// This part will append after ajax call i have used autocomplete search
<tr id="+ui.item.id+"> // product_id
<td><i class='flaticon-delete-1 delete-row' onclick='deleteRow(this)'></i></td>
<td>"+ui.item.value+"</td>
<td>"+ui.item.unit_price+"</td>
<td><input type='text' class='quantity' value='1'></td> //quantity
<td class='total'>"+ui.item.unit_price+"</td>
</tr>