First, you should obtain the number of products from the server.
For each product, create a new button and assign its name accordingly.
You should be able to make a dummy button to duplicate over and over again for each product.
solved Is there a way to create X number of buttons without me having to write each and one of them? [closed]