Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Help: Stock not decreasing due payment module problem


Recommended Posts

The pagseguro module for Brazilian store owners is, for lack of a better word, troubled.

It uses tons of ucnecessary validations and all that cause it assumes the shop will need the payment validation instantly. Since mine doesn't need it, I set it to skip this mumbo-jumbo and go directly to checkout_success.php.


But a problem arises: decreasing stock and clearing the cart. I already found the $cart->reset(true); string to clear the cart, but I can't find the code to decrease the stock.


-"oh my you're gonna decrease stock without payment confirmation?"

-yes, cause I sell Horrorclix/Heroclix single miniatures, and 2 people purchasing the same product while the payment is being confirmed is a big trouble for me.


that said, can anyone point me to the checkout_xxxxxx.php code I must insert in check_success.php so it decreases stock of the itens before I reset cart?


thanks a lot


Caio Donini

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...