I copied your code , saved it and still find it difficult to follow. In the future I suggest a lot more remark lines during developement. You can always take them out later.
This I think is your real question:
Quote:
|
when a dvd is added to the cart and the order is not finished it is subtracting the item from the quanity,
|
Some where in your code you are subtracting the item when it is added to the cart. This process should actually occur after the payment has been made or the order is confirmed.
You may need to move or recode that portion of the script, possibly even move it to another script. The second option is to reverse the process if the order is cancelled. That may be harder since some people don't empty the cart, they just close the browser.
There is no way for anyone to show you an example without having a complete copy of the scripts and the database. At least I know I could not. And that is not an offer. 
|