I am at a total loss as to how to accomplish a feature in a shopping
cart. (I am using PHP5 and MySQL)
Basically, when someone adds an item to their cart, it should alter
the inventory to reflect it. That part i have fine, but the problem
is, that should a person decide not to complete their purchase, the
level should go back up. So the decrease in available stock should go
down only temporarily, until checkout.
The actual transaction is through PayPal, which complicates things,
cause let's say someone quits halfway on the paypal site, i'd have no
way to trigger a script or something like that. Or, even if they go
through a transaction, a user may not return to the site to trigger a
confirmation script.
I have been reasearching all day, and it just baffles me. I had
considered a type of "users online" type of script, but i guess the
logic just baffles me. The poimt of this is to avoid overselling
stock.
So yeah, if anyone can help by pointing me to a script or just give
some logic on how i can keep track of inventory this way, that would
be fantastic.
cart. (I am using PHP5 and MySQL)
Basically, when someone adds an item to their cart, it should alter
the inventory to reflect it. That part i have fine, but the problem
is, that should a person decide not to complete their purchase, the
level should go back up. So the decrease in available stock should go
down only temporarily, until checkout.
The actual transaction is through PayPal, which complicates things,
cause let's say someone quits halfway on the paypal site, i'd have no
way to trigger a script or something like that. Or, even if they go
through a transaction, a user may not return to the site to trigger a
confirmation script.
I have been reasearching all day, and it just baffles me. I had
considered a type of "users online" type of script, but i guess the
logic just baffles me. The poimt of this is to avoid overselling
stock.
So yeah, if anyone can help by pointing me to a script or just give
some logic on how i can keep track of inventory this way, that would
be fantastic.
Comment