__construct() – Load the product model and cart library.
index() – Using the Product model's getRows() function, fetch products from the database. Product data is passed to the view and the product list view is loaded.
addToCart() — Retrieves information about a specific product based on its ID. Use the Cart class's insert() function to add a product to the cart.