al_foto Posted December 3, 2012 Share Posted December 3, 2012 I have made a short module for a special function after order confirmation using hookupdateorderstatus and it works fine with other payment methods but not with Paypal. I'm using if ($params['newOrderStatus']->id == Configuration::get('PS_OS_PAYMENT') ) to check if order has been confirmed but this only works for status 2 (Payment accepted) but not for 12 (Payment remotely accepted). Please, can someone let me now the Configuration::get value for this status or a better way to check if order has been confirmed ? Thanks. Link to comment Share on other sites More sharing options...
bellini13 Posted December 5, 2012 Share Posted December 5, 2012 "Payment remotely accepted" is PS_OS_WS_PAYMENT 1 Link to comment Share on other sites More sharing options...
al_foto Posted December 5, 2012 Author Share Posted December 5, 2012 Thanks, I already got it searching the code. Have modified my hook and seems to work. I'm a bit dissapointed with Prestashop, I had to change so many things on the to make it work that probably can't update for next versions. It's not a good solution for virtual products in my opinion. Link to comment Share on other sites More sharing options...
bellini13 Posted December 5, 2012 Share Posted December 5, 2012 if you wanted to do something after receiving a new order, you used the wrong hook. the is a neworder hook that you should use instead, that will get called regardless of order status Link to comment Share on other sites More sharing options...
al_foto Posted December 6, 2012 Author Share Posted December 6, 2012 The updatestatus is fine because it should only be fired after order is confirmed, but I don't understand why different payment processors can't trigger just one "order confirmed" status. Link to comment Share on other sites More sharing options...
bellini13 Posted December 6, 2012 Share Posted December 6, 2012 I'll assume that you are using the latest version of the Paypal module (v3.4), which has just recently made the change to use this external status. If you don't like it, you can always change it. There are 4 places in the module code were PS_OS_WS_PAYMENT is used. I'm not going to be able to explain why Prestashop developers do what they do, sometimes you just need to live with the fact that they provide a free product and tailor it to many different types of users. When you don't like something, you change it to fit your needs. 1 Link to comment Share on other sites More sharing options...
al_foto Posted December 6, 2012 Author Share Posted December 6, 2012 Thanks, but changing more code is not what I'm looking for, last update required me to change a lot of code again. 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