5haun Posted June 25, 2014 Share Posted June 25, 2014 Hey Guys How can I use the current date (YYYY-MM-DD) instead of the invoice number? So when customer makes a purchase, it will show the date in the filename of the pdf and the pdf itself. Any ideas?Thanks Link to comment Share on other sites More sharing options...
5haun Posted June 30, 2014 Author Share Posted June 30, 2014 Can anyone help me here? Link to comment Share on other sites More sharing options...
bellini13 Posted June 30, 2014 Share Posted June 30, 2014 using this date format "YYYY-MM-DD" is not unique, how would you tell the difference between multiple orders on the same date? 1 Link to comment Share on other sites More sharing options...
5haun Posted June 30, 2014 Author Share Posted June 30, 2014 using this date format "YYYY-MM-DD" is not unique, how would you tell the difference between multiple orders on the same date? Yes I agree. What about adding the time? YYYY-MM-DD-TIME (hour-minutes-seconds) ? Link to comment Share on other sites More sharing options...
bellini13 Posted June 30, 2014 Share Posted June 30, 2014 thats up to you, you need to decide how many orders you expect to receive and if 2 of them can come at the same second or not, and if they do, will having the same invoice number be problematic. Now as for the changes you are looking to make, are you looking to hire someone to make these changes for you? Or are you fluent in php programming? 1 Link to comment Share on other sites More sharing options...
5haun Posted June 30, 2014 Author Share Posted June 30, 2014 Thanks for the reply.I am not exactly fluent in php programming but I know my way around.What changes would be involved? Link to comment Share on other sites More sharing options...
bellini13 Posted June 30, 2014 Share Posted June 30, 2014 I'm not going to be able to document a coding solution for you here, but i can get you started 1) /controllers/admin/AdminPdfController.php is what executes when you generate the PDF invoice from the back office details page. It also uses the PDF class located in /classes/pdf/PDF.php. The filename is a variable inside the PDF class 2) /classes/pdf/HTMLTemplateInvoice.php generates the invoice # that you see within the PDF Now if you are looking to hire someone, feel free to send me a PM and we can discuss those details 1 Link to comment Share on other sites More sharing options...
5haun Posted July 1, 2014 Author Share Posted July 1, 2014 I found this module:http://addons.prestashop.com/en/billing-invoicing-prestashop-modules/16684-custom-number-custom-order-and-invoice-numbers.htmlThank you for all your advice! Link to comment Share on other sites More sharing options...
Recommended Posts