Changing onscreen inventory levels when a product is dropped on the cart
The first two recipes in this chapter lead up to the complexity found in this example. Those familiar with the concepts will find the client-side inventory level tracking quite easy to follow.
How to do it
In order to display the inventory and quantity levels, the HTML markup changed slightly. We note that important change as we proceed with the tracking of quantities.