V
V
Vadim2014-07-07 17:11:42
Online shopping
Vadim, 2014-07-07 17:11:42

How to make a basket?

Good evening
How to make an online shopping cart?
- Record the contents of the basket in the session, after placing the order, transfer to the database.
- Write the contents of the basket directly to the database.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Entelis, 2014-07-07
@ShVad

The language seems to be PHP? :)
It is better to write the contents of the basket directly to the database.
Firstly, it will allow you to implement a normal reservation of goods. How to properly account for the balance of goods in stock?
Secondly, storing data in sessions is quite expensive.

E
Emil Rakhmatullin, 2020-08-19
@Emchik

Use the angry-cart.js plugin. It is in pure JS + contains everything you need

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question