Home > Back-end >  Ask questions about the mall shopping cart project.
Ask questions about the mall shopping cart project.

Time:09-20

Is a mall shopping cart to do project, still have even if an item in the shopping cart inside, suddenly a database for the commodity or remove from the shelves, then how do we deal with reasonable, the shelves of goods in the shopping cart can still point?

CodePudding user response:

The old man? No one help me to answer at once?

CodePudding user response:

Regardless if you have a problem, the design of the shopping cart order when should do judgment, to determine whether a commodity status is normal or commodity number greater than zero, otherwise it will prompt the user,
Also can ask judge state of goods into the shopping cart

CodePudding user response:

Goods storage pool should be a state 0: shelves,. 1; Shelves, rather than directly to delete, change state of current frame, interface state of goods become the shelves can't click at the same time, certainly also in the shopping cart. Can't click

CodePudding user response:

Deleted database, application code changes reflect the state of the goods inside

CodePudding user response:

I think when goods shelves, using message middleware for passing messages between different modules, then the items in the cart status changes, such as not selected, without goods | shelves, etc., and then keep delete option,

CodePudding user response:

Delete database level, must not trigger code;
When users click on the shopping cart, then you should go to trigger a check goods state logic;
As for the show has been pulled from the shelves or directly from the shopping cart will disappear, you want to let the user how to... Usually have shelves can appear relatively easy to accept...

In general, the shopping cart to local cache, cookies/users must also have the stored on the server side; As for the server side is based on the database, no, file database, see your users and the design of the whole system.
  • Related