We can utilize CI's shopping cart library when we are building a e-commerce site. we can setup add to cart, update cart items, delete cart items and even clear the cart functionalities using this library.
From CodeIgniter Doc : The Cart Class permits items to be added to a session that stays active while a user is browsing your site. These items can be retrieved and displayed in a standard “shopping cart” format, allowing the user to update the quantity or remove items from the cart.