Control of trolley products

Asked

Viewed 51 times

0

Good morning!

I’m making a system where the user chooses the products (where there is only 1 unit of each) and he puts these products in the cart. I need to control this cart for a certain time, when this time expires I need to send a message to the user to know if he wants to continue. If you do not wish, I need to release the cart and release the tickets.

How can I control this time, type user X entered the site and chose product 1, how to block this product 1 for 10 minutes? Case between user Y can not put in the cart this product 1.

  • creates a table and stores this information, so you will know you have N less available products

  • But the product is unique and has only 1 unit of each product. I need to control the time that this product is in the cart because, if it is not carried out the payment of the same need to release to other users

  • exact, includes the product in a table, if it exists there is pq is in someone’s cart :)

  • but that’s it. I can’t leave the product forever there, so I want to control how long it’s been in some user’s cart

  • If you’ve ever used a shopping cart type tickets you know that by putting an item in the cart, it stays there for XXX minutes after it expires, IE, you have to complete the production of purchase or is available. In this "control" table puts the date/time that added the item, or when to include the date that expires, for example in 20 minutes. When you consult this table look at this date, if it has already expired, remove the table item and make it available to another user

  • exactly what I need. But from what I understand, I control every product. Can I control a cart that has several products, which were added in different time? For example, the trolley has an expiration time (all products of the trolley)

  • ai goes from your modeling, can have 2 tables, 1 for the cart and another for the items in the cart (products), or use a "id" cart in the same table, since it is temporario

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.