Products
The products are displayed with the help of two files i.e. the model file 'product.php' and the products view page named as 'products.php'
The general flow is that all the products stored in the database are fetched into an object, along with corresponding product information with the help of 'while loop' inside the 'get_products' function, defined in the model file 'product.php' and then they are displayed on the 'products.php' page. The parameters of the function select the appropriate query to be executed on the 'products' table
Images of the products are stored in the folder 'project/products/catalog/' and there names are stored in the database in 'product_image' field.
See the following screen shots to visualize the process explained.
Access this course and 1400+ top-rated courses and projects.