I believe, in you 1st input page you are creating you inventory any managing your product availability list. After providing the product ID and quantity, please save the same into your DB. Because this inventory will use for your remaining shopping card functionality.
In the second page which you have mentioned its look like shopping card or page where user is going to select product name/ID and then avail to see the product detail. You can use the reference selector to give the product list in your shopping page. After selecting an item, display product reference information and then after adding a input field for purchase quantity. Create an action button with link of microflow to verify available quantity verification. If product available as per purchase quantity request, add the item into your card and calculate total price for the card.