So I'm looking for a solution to save invoice automatically into my server folder, when I press view invoice as the generated URL occurs (http://www.example.com/admin11111/index.php?controller=AdminPdf&token="token"&submitAction=generateInvoicePDF&id_order="id").
I also did research on google, but this solution, somehow didnt work for me: https://www.prestash...es-in-a-folder/
From Prestashop Forum I got advice that I should use shell script, but using a shell download like wget or other only gets me html file, because when I download the invoice in Prestashop backoffice.. it takes some time to generate and the download save appears later.