Hi,
First, you need to create custom fields of the table "entry". You will see them on your entry page.
Then, you can create your products and in the entry custom fields, you can select your product in the "Correspond to the product" option.
When you click on "next" in the entry page, the system will post your entry fields selection and based on them will add to the cart or not the products that you have in the "Correspond to the product" option of the fields and finally it will redirect to the checkout. However, if based on your fields options no product is added to the cart, the checkout will redirect back to the "URL where to redirect when the cart is empty" in your configuration and display the message saying that the cart is empty.
You should try to look at our tutorial on entry fields:
www.hikashop.com/en/support/documentation/75-entry-listing.html