Answer the question
In order to leave comments, you need to log in
How to make a shopping cart on the site?
Hello!
Tell me links to good manuals and lessons on creating a basket in php. It is necessary that when you click "Add to cart" the line in "There are no goods in the basket" changes to "There are so many goods in the basket for such and such an amount", but there is no payment. When I send it, I just get an email with the order. That's about such a lesson is needed, although I will be grateful for any. Thanks in advance.
PS Don't throw stones, I'm just learning.
Answer the question
In order to leave comments, you need to log in
Well, to just such a lesson - it's unlikely! Perhaps there are some for specific CMS, but universal - no. You need to understand the session mechanism and that's it. Read about the $_SESSION superglobal array. :)
Podskajite manuals about flights to Mars. it is necessary that after the launch of the rocket it would be displayed "the landing on Mars was successful" and then after a while a letter came to the post office about the results of the mission.
but in general, learn php and move your brains, everything is there) and if you are too lazy, then take it ready, there are just buttons that change the lines in the interface.
It is possible from without sessions. All in javascript. You click buy - the product is in cookies. And when making a purchase, you transfer all cookies to the server. You are already placing an order on the server. And no load on the server, everything is done on the front. No need to store the cart in the database. Pulling the base every time you click buy is a waste of server resources. And it also infuriates when you go into the basket and decide to increase the quantity of goods, you press +, and then you need to press another update.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question