Zhen-Xlogic Posted January 23, 2018 Share Posted January 23, 2018 (edited) Hello to community of PS, Full newbie on PS recently i was stating building a new eshop on PS, to day i buy a payment module for credit cards. But i have to deal with a problem when the credit card payment failed or refused because the card dosen't have money or the data is incorrect is decrase my product stock. In order status i have 3 status for CC Rufused | CC Error | CC Digest Error, is there any way to this specific 3 status the prestashop dont decrease my product stock ? PS.: The Advance Stock Management is disabled, i dont want it . Thanks, Zhen-Xlogic. Edited January 23, 2018 by Zhen-Xlogic (see edit history) Link to comment Share on other sites More sharing options...
Zhen-Xlogic Posted January 23, 2018 Author Share Posted January 23, 2018 After a big cup of coffeeeeee, i made a modification in core and i add my module error status : OrderDetail.php Line: 470 protected function checkProductStock($product, $id_order_state) { if ($id_order_state != Configuration::get('PS_OS_CANCELED') && $id_order_state != Configuration::get('PS_OS_ERROR') && $id_order_state != Configuration::get('PS_OS_CC_REFUSE') && $id_order_state != Configuration::get('PS_OS_CC_ERROR') && $id_order_state != Configuration::get('PS_OS_CC_DIGEST_ERROR')) { $update_quantity = true; OrderHistory.php Line: 169 $error_or_canceled_statuses = array(Configuration::get('PS_OS_ERROR'), Configuration::get('PS_OS_CANCELED'), Configuration::get('PS_OS_CC_REFUSE'), Configuration::get('PS_OS_CC_ERROR'), Configuration::get('PS_OS_CC_DIGEST_ERROR')); This modification working ok but i modify the core dont know if this will create problem, if you have any other suggestion late me know it!!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now