Cart System Examples?

Are there any example code of a cart or checkout system?

I want to send my users a picture. Below that picture is an inline keyboard that says "add to cart".

Once they click add to cart, it sends it to a place to store the cart.

I am doing this with Mysql currently but have ran into a few issues and to be honest i'm curious on how other people or bots are doing it. THanks!