Getting started with PHP: Developing a shopping cart


Contents:


Grocery list
To create a basket, we use materials from the PHP & MySQLi. In fact, the list of products there ...
Class Cookie
For convenient control of the cookies, create a corresponding class that will contain methods for wr...
Class Cart
Let's create a basket class that will interact with the cook class. This class, first of all, will c...
Adding products to the cart
Create a script cart.php, in which we will write scripts for manipulating the basket and its content...
List of products in the basket
To display the list of products, we will add the script to the file cart.php: [php]if ($action == '...
Remove items from the shopping cart
Remove products from the basket, we will either by the product ID, or by a full cleaning of the bask...
Adding AJAX
In this lesson we demonstrate the use of AJAX to add goods to the shopping cart. First of all, let's...
Remarks
1. In this course, a basket with a minimum amount of simple code was examined. Naturally, when integ...