How to add a 'add to card' button to a repeater?

You want a code or you have already? And you want that function: when the user clicks on the button i.e., add to cart. Right?