Add and add items (basket)

I want to create a shopping cart in php with Session and Ajax. My idea would be to create a screen of orders and add products, add them, and then complete the application, an idea of ​​how to do it?