Hello, there is the following task: Without registration, you must add to the basket the item on which the "Buy" button was pressed. I think to create a database and have 2 tables in it, in the first one all the goods, and in the second one that product that was purchased. Tell me how you like my version, and is it even possible to make everything even easier? No matter what. You can give a solution in JS or PHP

Closed due to the fact that the issue is too general for participants aleksandr barakin , Air , Viktor Tomilov , AK , Edward 31 Jan '18 at 22:07 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    Nobody will be ready to give the decision, but the approximate principle is: 3 tables - users, products, orders. We put in the Users any logged in, we assign him a cookie with data from the database for identification. He orders the Goods, in the Orders we place the number of the Goods, the User's number, the date of the Order, the quantity of the Goods, the total amount, data about the buyer. Everything. However, if the same person logs in from another device, then this store will be a new customer with a new shopping cart. - DaemonHK

0