This is a quick-and-dirty fix to a bug that causes the user to be returned (after paying with PayPal IPN) to the shopping cart with items marked as unavailable rather than the checkout_success page.
This occurs if all of the following conditions are met:
1. Their order (or another order that took place in the meantime) causes any of the products to go out of stock.
2. Stock Checking is turned on.
3. An IPN has been received with payment_status == 'Complete' before the user returns to the store
It may happen in other conditions as well.
In catalog/checkout_process.php find the lines (approx line 56):
// Stock Check
$any_out_of_stock = false;
if (STOCK_CHECK == 'true') {
and change to:
// Stock Check
$any_out_of_stock = false;
if (STOCK_CHECK == 'true' && !tep_not_null($_GET['payment_status'])) {
This bypasses the stock check when the user has been sent to the checkout_process page by PayPal.
As I said, this is quick-and-dirty. Hopefully a cleaner fix can be rolled into the next release of the PayPal IPN contribution.
More...





LinkBack URL
About LinkBacks









Bookmarks