Pau111111 Posted November 12, 2017 Share Posted November 12, 2017 Hi Prestashopers, i need help!! It's important!! I don't know why now I can't see invoices in order history page when a user is logged in. Thanks for your help! Link to comment Share on other sites More sharing options...
tuk66 Posted November 14, 2017 Share Posted November 14, 2017 Check if the invoices are really created. Can you see them in the Back Office? Link to comment Share on other sites More sharing options...
Pau111111 Posted November 14, 2017 Author Share Posted November 14, 2017 Yes, I can download them in the back office. Mi clients need to download their invoices to pay by bank transfer . Link to comment Share on other sites More sharing options...
tuk66 Posted November 14, 2017 Share Posted November 14, 2017 It looks like the ps_orders table is partly corrupted. I mean not all invoice data is right in all tables. I cannot say more without seeing the database. Link to comment Share on other sites More sharing options...
bellini13 Posted November 14, 2017 Share Posted November 14, 2017 What is the order status of the order at the time the customer is looking for the invoice? Is that order status configured to allow invoices? Link to comment Share on other sites More sharing options...
Pau111111 Posted November 14, 2017 Author Share Posted November 14, 2017 (edited) the order status of the order at the time the customer is looking for the invoice is "preparation in process". What should I do if ps_orders is partly corrupted? Edited November 14, 2017 by Pau111111 (see edit history) Link to comment Share on other sites More sharing options...
Pau111111 Posted November 14, 2017 Author Share Posted November 14, 2017 I had made a table with a relation to ps_orders and now all the infromation of that table has been erased. Can it have any relation to the problem? Link to comment Share on other sites More sharing options...
bellini13 Posted November 15, 2017 Share Posted November 15, 2017 How how is the "preparation in process" order status configured? Edit the order status and confirm it is configured to allow PDF invoices Link to comment Share on other sites More sharing options...
Pau111111 Posted November 19, 2017 Author Share Posted November 19, 2017 The problem is that it has always worked, I have not changed any restriction of the invoices, it is all correct. Link to comment Share on other sites More sharing options...
Pau111111 Posted November 19, 2017 Author Share Posted November 19, 2017 I have commented on the IF that caused the invoices to be shown in the history.tpl file. Now it works but I do not understand what can fail, in theory this is all ok. Link to comment Share on other sites More sharing options...
bellini13 Posted November 20, 2017 Share Posted November 20, 2017 you really need to go through that if statement and see what condition is evaluating to false that makes it go to the else statement. Link to comment Share on other sites More sharing options...
Pau111111 Posted December 3, 2017 Author Share Posted December 3, 2017 "$order.invoice" returns 0 allways Link to comment Share on other sites More sharing options...
tuk66 Posted December 4, 2017 Share Posted December 4, 2017 No surprise. I would recommend to focus on one order and check related records in all ps_order* tables. Link to comment Share on other sites More sharing options...
bellini13 Posted December 5, 2017 Share Posted December 5, 2017 (edited) On 12/3/2017 at 3:37 PM, Pau111111 said: "$order.invoice" returns 0 allways And what specific version of Prestashop are you using? the invoice variable is obtained from the ps_order_state table. So you should locate the order state record for this order and confirm what the value of the invoice column is for that order state. Edited December 5, 2017 by bellini13 (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted December 5, 2017 Share Posted December 5, 2017 You also said that the order is in the "preparation in progress" state, however that is not true.. is it? According to your first screen shot, the order is in the Enviado state... which i believe is the "Sent" order status. You will need to confirm the configuration of that Order State... Link to comment Share on other sites More sharing options...
Pau111111 Posted January 7, 2018 Author Share Posted January 7, 2018 And what specific version of Prestashop are you using? the invoice variable is obtained from the ps_order_state table. So you should locate the order state record for this order and confirm what the value of the invoice column is for that order state. Link to comment Share on other sites More sharing options...
Vito Posted September 2, 2018 Share Posted September 2, 2018 Hi, I just had the same situation (PS 1.7.2.4). I needed to generate invoice PDF during the preparation (when state "preparation in progress"), then I checked on "Allow customers to download invoice in the PDF format". I did that, but at the same time as I thought it should be just single checked - I went to state "Completed" and removed tick from this option. So, it was my mistake, and PDF download link dissapeared from the customer order history page. I looked to *.tpl, *.php and so on. But solution was very simple In fact, in this situation "Allow customers to download invoice in the PDF format" should be checked on in two states: "preparation in progress" and "completed". As I understand - PDF generates after first of this states is set, and then it is just a question about PDF link visibility for customer. best regards, Vito 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