Jump to content
zefeena

Basket not emptying/stock not decreasing after order - Worldpay

Recommended Posts

My apologies, as I know I have asked this question before, but it seems I still have the problem, and I cannot find the thread from previous discussion.

 

Sometimes - and it appears not every time, when a customer check out and successfully creates an order

1 - the basket does not empty

2 the stock does not decrease

 

The basket not emptying isn't really a problem to me, except that by not emptying it appears it is not decreasing the stock - which is a BIG deal, as I have thousands of items and need my stock control to work.

The last order that I notice this has happened to, this is the 'comment' I get from Worldpay.  Anybody any idea what is wrong? thanks,

Screenshot 2019-04-08 at 12.54.59.png


Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Share this post


Link to post
Share on other sites

The issue is the customer. If he don't finish the payment correct, than this happens. After he paid, than he close the webbrowser or he use the back buttons

of his browser. Same problem if customer pay with PayPal. And if the basket not empty, than it's logical, that the stock dosent decrease.


  • The clever one learn from everything and from everybody
  • The normal one learn from his experience
  • The silly one knows everything better

[socrates, 412 before Christ]

Computers help us with the problems we wouldn't have without them!
99.9% of the bugs sit in front of the computer!
My programmed add-ons: WDW EasyTabs 1.0.3, WDW Facebook Like 1.0.0

if(isset($this) || !isset($this)){ // that's the question...

 

Share this post


Link to post
Share on other sites

@zefeena mcmannehan is partly correct, .

You haven't said the specific WorldPay module you're using, so I'm going to use a little guesswork here but I've done my fair share of WorldPay integrations so should be ok and I'll assume the stock WorldPay/rbsworldpay module that comes with osC v2.3.4 bootstrap as per your sig.

It could be one of the following:

  • The customer is not being forwarded to checkout_process.php after payment and after being taken to hosted_callback.php from WorldPay
  • Or there is an issue with your checkout_process.php file which isn't triggering the before_process() function in includes/modules/payment/rbsworldpay_hosted.php (or the issue could be in this file)

So pinpointing the issue should be the first step and the following will provide me with some clues. 

  • Are some baskets being emptied and some not OR are all baskets not being emptied?
  • Are order confirmation emails being sent to yourself and the customer when payment is successful?

If you're happy to do so, please attach the following files and I'll take a look:

  • /ext/modules/payment/rbsworldpay/hosted_callback.php
  • /includes/modules/payment/rbsworldpay_hosted.php
  • /checkout_process.php

 


If it still don't work, hit it again!

Senior PHP Dev with 18+ years of experience for hire, all requirements considered, see profile for more information.

Is your version of osC up to date? You'll find the latest osC version (the community-supported responsive version) here.

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

×