iDevil Posted February 5, 2010 Share Posted February 5, 2010 Hi!I would like to know how to change the initial oder no. and is it possible that use the custom format, such as 20101225029XXXX.Thanks. Link to comment Share on other sites More sharing options...
Martin Velikov Posted February 5, 2010 Share Posted February 5, 2010 Unfortunately, I don't think this is possible. But still as it seems you want to include the date in the order number. You can always check the order date if you have the order ID. The only option would be to manually alter those in the database which will most probably cause discrepancies.Finally if you want to change the order no. for the invoice only so it is provided differently for your customer you can edit the PDF before sending it, then again this would be too much work. Link to comment Share on other sites More sharing options...
bigstef Posted February 5, 2010 Share Posted February 5, 2010 Not sure if this is what you are looking for but if you just want to change the invoice number go to the BO, Orders, Invoices and you are able to change the next number at the botton of the screen.Hope this is of help. Link to comment Share on other sites More sharing options...
uddhava Posted February 5, 2010 Share Posted February 5, 2010 Do not change the invoice number !!!.This will crash your shop and no orders can be placed anymore... Link to comment Share on other sites More sharing options...
bigstef Posted February 5, 2010 Share Posted February 5, 2010 Do not change the invoice number !!!.This will crash your shop and no orders can be placed anymore... What a load of rubbish!!This is an option in the BO for changing the invoice number. Why would you not be able to accept orders??I have used it and my shop works perfectly. Link to comment Share on other sites More sharing options...
uddhava Posted February 5, 2010 Share Posted February 5, 2010 What a load of rubbish!!This is an option in the BO for changing the invoice number. Why would you not be able to accept orders??I have used it and my shop works perfectly. Not a load of rubbish (what a un-nice word). There is a confirmed bug (1.3.0) see hereSo to put it bluntly again. Do not put the invoice number at 0... Go ahead try it. ;-) Link to comment Share on other sites More sharing options...
bigstef Posted February 6, 2010 Share Posted February 6, 2010 Why put the invoice number to 0.If you know that causes a problem start the invoices at 1.I am using version 1.2.4 and have changed the invoice number to a higher number to follow on from my last shop and it works no problem.Just because you had a problem with changing the invoice number does not mean that it will stop all orders and make the shop stop working. The feature is there for a reason, to change the invoice number.There is no mention they want to set this to 0, so instead of all the doom and gloom why could you not have responded that if they are using 1.3.0 do not set the number to 0. Link to comment Share on other sites More sharing options...
uddhava Posted February 6, 2010 Share Posted February 6, 2010 Well, the reason is to inform you & others that if you put the invoice on 0, (and why not) thenthe ordering will not function properly. (in 1.2.5 & 1.3.0.1). All your order will fail with a "Invalid Invoice Number".There are multiple users complaining about this, so this is a helpful comment. And the bug has been solved in the SVN. Link to comment Share on other sites More sharing options...
Lee Posted February 10, 2010 Share Posted February 10, 2010 hello.Not sure if this will be of any use, but we edited pdf.php so that the Invoice No.# gets replaced with the Order No#. Solves the problem of different order and invoice numbers on pdf invoices, as that can happen once in a while if you're deleting test orders etc. Also you don't need to enter the current correct invoice number into the backend before printing your invoiceshttp://www.prestashop.com/forums/viewthread/42954/thanks Link to comment Share on other sites More sharing options...
sm3004 Posted February 11, 2010 Share Posted February 11, 2010 Did you encounter any bugs after changing them over? hello.Not sure if this will be of any use, but we edited pdf.php so that the Invoice No.# gets replaced with the Order No#. Solves the problem of different order and invoice numbers on pdf invoices, as that can happen once in a while if you're deleting test orders etc. Also you don't need to enter the current correct invoice number into the backend before printing your invoiceshttp://www.prestashop.com/forums/viewthread/42954/thanks Link to comment Share on other sites More sharing options...
Lee Posted February 11, 2010 Share Posted February 11, 2010 No, it's fine - we've had it running on 3 seperate installations without any problems for the last week. I think if any problems arose with it, I doubt it would affect the back-end/database anyway as the pdf.php file just takes info from the database to create the pdfs, rather than putting information into it. thanks Link to comment Share on other sites More sharing options...
Degsey Posted March 29, 2010 Share Posted March 29, 2010 I did this hack and increased the order number in phpmyadmin and it looks great now, no low numbers and no two different numbers between order and invoice. Link to comment Share on other sites More sharing options...
dal_kos Posted April 7, 2010 Share Posted April 7, 2010 Hello Degsey,What did you change in phpmyadmin, in order to increase the order # ?Thanks Link to comment Share on other sites More sharing options...
Degsey Posted April 7, 2010 Share Posted April 7, 2010 You can use this command in phpmyadmin ALTER TABLE `defps_orders` AUTO_INCREMENT =1003; You can change the 1003 to any number you want. but back up your database before running the command. Link to comment Share on other sites More sharing options...
dal_kos Posted April 7, 2010 Share Posted April 7, 2010 It works! thank you! Link to comment Share on other sites More sharing options...
webplus Posted September 14, 2011 Share Posted September 14, 2011 Hi, I needed similar custom invoice change so maybe this can help someone: if you need invoice number e.g. FG2011001, just enter FG2011001 as a Invoice number in BO > Orders > Invoices and next number will be FG2011001, then FG2011002 etc. You can do the same by entering the prefix FG2011 and number as 1 and change following in /classes/PDF.php from $this->Cell(77, 10, self::l('INVOICE #').' '.Tools::iconv('utf-8', self::encoding(), Configuration::get('PS_INVOICE_PREFIX', intval($cookie->id_lang))).sprintf('%06d', self::$order->invoice_number), 0, 1, 'R'); to $this->Cell(77, 10, self::l('INVOICE #').' '.Tools::iconv('utf-8', self::encoding(), Configuration::get('PS_INVOICE_PREFIX', intval($cookie->id_lang))).sprintf('%03d', self::$order->invoice_number), 0, 1, 'R'); Not sure if there are some dependencies, I personally used the first solution and didn't test this further so TEST IT CAREFULLY before you set this to production, but it should work and affact the generated PDF invoice only, because sprintf function just adds the leading zeroes to the number, so we are just changing it from 6 digits to required value. This is the place in code where you can probably add some php function to add date into the invoice number as well. 1 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