Johnneysul Posted January 9, 2016 Share Posted January 9, 2016 Hello, my first post so I hope it is place for it, if not let me know. For the past 2 weeks I have been trying to resolve a problem that makes my site unusable. I upgraded from Prestashop 1.5 to 1.6.1.3 and PayPal 3.10.2. When an order is completed, the customer selects PayPal they are brought to the PayPal site as normal. When they finish and pay they are brought back to my site, www.zero1two.com and they get the white screen and the error below. The return URL shows the token and customer ID. I have read everything I can find about this but I don’t understand the error. Could anyone help, explain the error or point me in a direction for information. The payment goes through OK in PayPal but does not register in Prestashop. Permissions are OK on files and folders. I have been editing the PayPal PHP files as information I’m finding on the net and seem to be causing more problems than I’m fixing. Any help appreciated.. The error I am getting on return to my site Notice: Undefined index: RedirectRequired in /hermes/bosoraweb047/b137/ipg.zero1twocom/public/prestashop/modules/paypal/express_checkout/payment.php on line 318 Notice: Undefined index: PAYMENTREQUEST_0_SHIPPINGAMT in /hermes/bosoraweb047/b137/ipg.zero1twocom/public/prestashop/modules/paypal/paypal_orders.php on line 70 Fatal error: Uncaught exception 'PrestaShopException' with message 'Can't load Order status' in /hermes/bosoraweb047/b137/ipg.zero1twocom/public/prestashop/classes/PaymentModule.php:190 Stack trace: #0 /hermes/bosoraweb047/b137/ipg.zero1twocom/public/prestashop/modules/paypal/paypal.php(1510): PaymentModuleCore->validateOrder(88, 2, 0.11, 'PayPal', 'Payment accepte...', Array, 1, false, '46fd7c6c8e9f0bc...', Object(Shop)) #1 /hermes/bosoraweb047/b137/ipg.zero1twocom/public/prestashop/modules/paypal/express_checkout/payment.php(301): PayPal->validateOrder(88, 2, 0.11, 'PayPal', 'Payment accepte...', Array, 1, false, '46fd7c6c8e9f0bc...', Object(Shop)) #2 /hermes/bosoraweb047/b137/ipg.zero1twocom/public/prestashop/modules/paypal/express_checkout/payment.php(321): validateOrder(Object(Customer), Object(Cart), Object(PaypalExpressCheckout)) #3 {main} thrown in /hermes/bosoraweb047/b137/ipg.zero1twocom/public/prestashop/classes/PaymentModule.php on line 190 My Prestashop setup Presta 1.6.1.3 PayPal 3.10.2 Theme Stock bootstrap Server information Linux #1 SMP Wed Dec 17 21:04:05 EST 2014 x86_64 Server software version Apache/2 PHP version 5.3.29 Memory limit 64M Max execution time 120 MySQL version 5.5.43-0ubuntu0.12.04.1-log MySQL server zero1twocom.ipagemysql.com MySQL name prestashop_2ioi7gdk5a MySQL user zero1twocom Tables prefix fcy_ MySQL engine InnoDB MySQL driver: DbPDO Thanks Johnneysul Link to comment Share on other sites More sharing options...
bellini13 Posted January 10, 2016 Share Posted January 10, 2016 This appears to be the error Fatal error: Uncaught exception 'PrestaShopException' with message 'Can't load Order status' and according to the following, it is trying to use Payment Accepted order status, which has an ID of 2. have you customized your store and removed this order status? PaymentModuleCore->validateOrder(88, 2, 0.11, 'PayPal', 'Payment accepte...', Array, 1, false, '46fd7c6c8e9f0bc...', Object(Shop)) Link to comment Share on other sites More sharing options...
Johnneysul Posted January 10, 2016 Author Share Posted January 10, 2016 Thank you so much for your reply. I have done minor customization within the theme and disabled several modules but have not altered any PHP files until recently. I have one order as "Order Accepted" by PayPal in the back office from about a month ago, around then I installed a module "Mail Alerts 3.6.0" because I missed an order as the customer could not complete PayPal payment, this has been disabled since. Would you be able to give me any idea as to where the Order Accepted status would be processed, or where I could look. Google seems to indicate that files would have to be edited to affect order statuses. Thanks for your time helping me with this.. Johnneysul Link to comment Share on other sites More sharing options...
bellini13 Posted January 10, 2016 Share Posted January 10, 2016 Review your order status in the back office > Order Status page Link to comment Share on other sites More sharing options...
Johnneysul Posted January 10, 2016 Author Share Posted January 10, 2016 I just looked in the database "fcy_order_state" and I don't have any "id_order_state" below 11, could this be the problem or am I looking in the wrong place and any if it is, any suggestions how I could correct it (maybe how it could have gone wrong). Link to comment Share on other sites More sharing options...
Johnneysul Posted January 10, 2016 Author Share Posted January 10, 2016 Ignore that, I was following information from Google. My Return Statuses in Back Office are .. 1 ... Waiting for confirmation 2 .. Waiting for package 3 .. Package recieved 4 .. Return denied 5 .. Return completed Others are.. 11 .. Awaiting PayPal payment 12 .. Payment remotely accepted 13 .. Authorization accepted from PayPal 14 .. -- 15 .. Waiting cod validation Should status 2 be 13? Link to comment Share on other sites More sharing options...
bellini13 Posted January 11, 2016 Share Posted January 11, 2016 So we can ignore the return statuses for now, we are only interested in Statuses, and by default there are 15 of them, numbered 1-15. By default, Prestashop uses ID=2 (Payment Accepted), along with most Payment Modules like Paypal, when creating a new order. So if you have nothing under ID 11 (ignore return statuses), then you need to recover those Link to comment Share on other sites More sharing options...
Alex_Druid Posted January 11, 2016 Share Posted January 11, 2016 Hi guys, I'm facing the same problems. Order status are ok, no change made and payment status still in 2nd position.... Do you have more infos bellini13 to solve this ? Thanks in advance Alex Link to comment Share on other sites More sharing options...
bellini13 Posted January 11, 2016 Share Posted January 11, 2016 Post the error you received Link to comment Share on other sites More sharing options...
Johnneysul Posted January 11, 2016 Author Share Posted January 11, 2016 Bellini13, you will forever be considered a genius. I edited the database with some information I found on the interwebs which got me the entries back but missing some entries. I got a picture of what should be there and edited them in the back office. It seems to be working. I will give a better description once it is all done and I’m sure it is back to normal. Thee is no possibility that I would ever have found this without help... Thanks for everything. Link to comment Share on other sites More sharing options...
Johnneysul Posted January 12, 2016 Author Share Posted January 12, 2016 Hi Alex_Druid. I found many different reasons for errors like this on the internet. If you turn on error reporting you will get a more detailed description of the fault when it happens again. open the file .... config/defines.inc.php and edit the line, change 'false' to 'true' ........define('_PS_MODE_DEV_', false); Don't forget to change it back when you solve the problem. This is what I did to fix the missing order statuses problem but there may be an easier option. Open the shop database in MySql. Click on the entry PS_order_state. Click Browse and you should see all the statuses entered that you have in your back office. To put in another one just click on Insert New Row. Keep adding until you have all the rows needed. INSERT INTO `ps_order_state` (`id_order_state`, `invoice`, `send_email`, `module_name`, `color`, `unremovable`, `hidden`, `logable`, `delivery`, `shipped`, `paid`, `deleted`) VALUES(1, 0, 1, 'cheque', 'RoyalBlue', 1, 0, 0, 0, 0, 0, 0),(2, 1, 1, '', 'LimeGreen', 1, 0, 1, 0, 0, 1, 0),(3, 1, 1, '', 'DarkOrange', 1, 0, 1, 0, 0, 1, 0),(4, 1, 1, '', 'BlueViolet', 1, 0, 1, 1, 1, 1, 0),(5, 1, 0, '', '#108510', 1, 0, 1, 1, 1, 1, 0),(6, 0, 1, '', 'Crimson', 1, 0, 0, 0, 0, 0, 0),(7, 1, 1, '', '#ec2e15', 1, 0, 0, 0, 0, 0, 0),(8, 0, 1, '', '#8f0621', 1, 0, 0, 0, 0, 0, 0),(9, 1, 1, '', 'HotPink', 1, 0, 0, 0, 0, 1, 0),(10, 0, 1, 'bankwire', 'RoyalBlue', 1, 0, 0, 0, 0, 0, 0),(11, 0, 0, '', 'RoyalBlue', 1, 0, 0, 0, 0, 0, 0),(12, 1, 1, '', 'LimeGreen', 1, 0, 1, 0, 0, 1, 0),(13, 1, 0, '', '#DDEEFF', 0, 0, 1, 0, 0, 0, 0); Reference....... https://www.prestashop.com/forums/topic/208404-solved-cant-load-order-state-status-at-line-146-in-file-classespaymentmodulephp/ I only put in the basic information here. I went back to Order Status in back office and edited the new entries here using information from a search for Prestashop Order Status in Google Images. It is working fine for me now but I am only using cheque and PayPal. Hope this helps others.. Again, thanks to Bellini13 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