Jump to content
Sign in to follow this  
Druide

PayPal_Shopping_Cart_IPN_v2.6a (addon ONLY)

Recommended Posts

PayPal_Shopping_Cart_IPN_v2.6a (addon ONLY)

 

Official thread for the main contribution:

http://forums.oscommerce.com/index.php?showtopic=95326&st=0

 

I released this as a new contribution so Gregory's works stays clean and ordered.

No Offence to Gregory !!!

He will add this maybe in a future version (option)

 

I do advise people to TEST this addon first on a test / development site and NOT immediatly on a HIGH PRODUCTION site.

I don't take ANY risk for damages !!!

 

Written by Robert Hellemans

for my new live site

 

Example:

see screenshots (note not everything you see in the screenshots is in this addon)

 

All credits still go to Gregory Baboolal for all his effort in PayPal IPN

(send him a paypal donation :wink:)

 

because we make & sell glasswork beads and those are

all unique so the stock quantity is almost always 1 or 2 pcs.

 

And this amazing Paypal IPN contribution only updated the stock when

you (the store owner) have accepted/confirmed the payment at paypal.com

which is great for high volume e-shops but for us it was not correct.

Clients where able to buy the same single item which has only 1 pcs in stock

if you (the store owner) did not update your paypal payments soon enough.

 

Now this little addon/change makes it possible to put ordered items in

an 'on hold / reserved' status in the products table only when a payment

is made with paypal !!!

 

When the client places an order and does the payment at paypal then when the first

paypal IPN is send to your store with the status 'Pending' the stock quantity of all

ordered products in that order will get inserted in the table products.products_on_hold

and the store will not show the 'add to cart' button in product_info.php

if the products_quantity is 1 pcs and the products_on_hold is 1 pcs.

It will display the text 'On Hold / Reserved' (see screenshots)

 

When you (the store owner) have accepted/confirmed the payment at paypal.com

then the ordered products_quantity & products.products_on_hold from that order will be updated.

Now the order is final and the ordered quantity is not anymore in on hold status.

 

NOTE: if your store uses other pages with a 'buy now' or 'add to cart' button

then there will be updates needed in those files.

see the changes in (and use your coding skills or use the contribution forum):

product_info.php

includes/modules/product_listing.php

 

 

TODO:

- update the review pages in catalog root

- make a CRON job or so for orders made but not payed or no IPN returned from paypal

- delete order option when the PayPal payment is not completed or other then Pending / Completed

- add products.products_on_hold to admin/catagories.php

etc...


Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Share this post


Link to post
Share on other sites

This is a contribution in development, when a customer pays by bank or credit card this 'addon' does NOT funtion properly i noticed 2day because it substracts the stock ONLY when a IPN Pending or Completed is received.

 

DO NOT install on a production site, your stock will not update correctly, sorry for that...


Robert

 

We all need to learn it once, how hard it may seem when you look at it, also you will master it someday ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×