Good day. I took on an atypical genre for myself - an online store. Posted Everything seems to be working. You can even make an order. It turned out a bit cumbersome, but according to test data, it still works faster than Joomla. And when I had all the work almost completed. I understand that I used sessions very inefficiently. With their help, I only passed a unique user id and a few more parameters. To store data from the shopping cart, I created a separate table and scored the data there. The disadvantage of this approach is that on almost every page, there is an additional query to the database.
Tell us how you implement a basket of goods in the online store and what do you use? Sessions, DB, or Cookies?