osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

osCommerce PayPal IPN Module v1.0 For 2.2MS2

This is a discussion on osCommerce PayPal IPN Module v1.0 For 2.2MS2 within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; This is a quick-and-dirty fix to a bug that causes the user to be returned (after paying with PayPal IPN) ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > New osCommerce Contributions

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Reply

 

LinkBack Thread Tools
  #1  
Old 06-30-2009, 01:00 PM
michael_s's Avatar
osCMax Developer


 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 15,732
Thanks: 139
Thanked 608 Times in 520 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Post osCommerce PayPal IPN Module v1.0 For 2.2MS2

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...
__________________
Michael Sasek
osCMax Developer

*** Do not PM me requesting paid help. The only paid work I do is for AABox Web Hosting customers ***

Stay Up To Date with everything osCMax:
Free osCMax Newsletters - Security notices, New Releases, osCMax News
osCMax on Twitter - Up to the minute info as it happens. Know it first.

osCMax User Manual - osCMax Templates - Advanced Template Tutorial

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
osCommerce PayPal IPN Module v1.0 For 2.2MS2 michael_s New osCommerce Contributions 0 04-26-2009 11:01 AM
osCommerce PayPal IPN Module v1.0 For 2.2MS2 michael_s New osCommerce Contributions 0 11-16-2007 08:41 PM
osCommerce PayPal IPN Module v1.0 For 2.2MS2 michael_s New osCommerce Contributions 0 10-23-2007 09:11 AM
osCommerce PayPal IPN Module v1.0 For 2.2MS2 michael_s New osCommerce Contributions 0 03-20-2007 09:50 AM
osCommerce PayPal IPN Module v1.0 For 2.2MS2 michael_s New osCommerce Contributions 0 02-17-2007 05:50 AM


All times are GMT -8. The time now is 05:34 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design