SuppaShe Posted May 15, 2019 Share Posted May 15, 2019 Hi, I have recently started to use prestashop and i am getting my self familiar with an existing PS account which runs diffrent shop. We had some sever related issues recently and had troubles to download orders etc. Now finally everything is fixed, however one of the shop does not generate the automatic invoice for the orders. Indeed, i cannot even enable the generate invoice button form the invoice tab, if this is done and saved it atomaticcaly turns off. All the invoice settings are fine cause nothing has been changed as one of the shop is finely working and generating invoices but not the other one. We are running presta shop 1.7.1.0 Tried diffrent solution and debugged invoice.tpl file as well as pdf.php and pdfgenerator.php and everything looks fine One thing which not sure of is if these files can be executed through an ftp call. I had some script which triggers the hook to confirm the orders which are called througth FTP. These scrip were not working at the beginning when called i have changed the permission of these script to 755 to be able to run the and it worked. So i am thinking, is it necessary to set the permission to 755 for the pdf.php or the pdfgenerator.php? And also where are these file called? Thanks to everyone! Link to comment Share on other sites More sharing options...
Appwards Posted August 9, 2020 Share Posted August 9, 2020 You have probably resolved your issues by now, but there's 2 options that I know of: Make sure the order passes through an order state that has the "Consider the order as paid" flag enabled. If that doesn't do the trick it might also be the "Consider the order as validated" flag :) Solve it through code as seen below: $order = new Order(2); // ← Update with the correct order ID $order->setInvoice(); 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