I want to add checkboxes for each item listed , I am using Each loop to render the list so , when I check the checkbox for that particular list item and I move to cart then I want to get that item object as the value of checkbox.
<input type="checkbox" name="list" >
<p></p>
<button class="btn btn-primary" id="addToCart" >ADD TO CART</button>
Now when I click the button I want it to return the object for which the checkbox was checked(i.e when list item 1 is checked then the button click should return list item 1 and so on...)
Note: I want to set the value of the checkbox equal to list item object.
Aucun commentaire:
Enregistrer un commentaire