mkwdmike Posted March 13, 2013 Share Posted March 13, 2013 (edited) Hi everybody, I'm not just a newbie here in prestashop, but a newbie at almost everything. My problem is this: I want to show my order reference number as the same as my invoice number. I have set my invoice prefix and generation fine. Prestashop version: 1.5.3.1 This, I believe is common practice, order number = invoice number. I've spent the last 4-5 hours on the forum trying to find out how to do this and have been unable to. Does anyone have the "Idiots Guide" to setting the order reference number to the same as the invoice number? I would really appreciate this help. Thanks in advance for your kind guidance. Is there nobody out there whose had this problem? It's taking a really long time. Ah well - if I can't get the info/help, I'll have to move on! That's the problem with these opensource things - you get f**kall support unless you pay an arm and a leg. They they mither you to death. We'll see Edited March 14, 2013 by mkwdmike (see edit history) Link to comment Share on other sites More sharing options...
mkwdmike Posted March 14, 2013 Author Share Posted March 14, 2013 Oh deary me. I've just seen how far this has bumped down the forum No wonder nobody is giving any info. We'll see 1 Link to comment Share on other sites More sharing options...
iansari13 Posted May 17, 2013 Share Posted May 17, 2013 (edited) Solved v 1.5.4 Order number #23 reference number (000023) and invoice number #IN000023 can be same. [sharedmedia=core:attachments:72198 if your order invoice number is different then make changes in your database in these tables id_order_invoice , id_order both field should be same in ps18_order_invoice_payment table id_order_invoice id_order number ps18_order_invoice all these should be same. Edited May 17, 2013 by iansari13 (see edit history) 1 Link to comment Share on other sites More sharing options...
iansari13 Posted May 17, 2013 Share Posted May 17, 2013 Solved v 1.5.4 Order number #23 reference number (000023) and invoice number #IN000023 can be same. if your order invoice number is different then make changes in your database in these tables id_order_invoice , id_order both field should be same in ps18_order_invoice_payment table id_order_invoice , id_order ,number ps18_order_invoice all these should be same. Link to comment Share on other sites More sharing options...
laziali Posted May 21, 2013 Share Posted May 21, 2013 stumble on the problem today, when decided to change the order ref from lets say FSJJSKSAJKJBS to 747569835 using the free module "modrefchange". that led to the need of a custom order id, identical to ref id 747569835. browsed around and found another free mod "numerique" in which you can choose the order id starting point. Combined the two modules gave me identic ref and order ids. i thought it was all in order, until ive made a test order and saw the invoice id still #23. it came as a shock as i thought its related to order id. for now i will just change the invoice number from BO to match my order and ref. number. If any of you got ideas how to make invoice# follow order # it would be great.thanks. Link to comment Share on other sites More sharing options...
iansari13 Posted May 22, 2013 Share Posted May 22, 2013 stumble on the problem today, when decided to change the order ref from lets say FSJJSKSAJKJBS to 747569835 using the free module "modrefchange". that led to the need of a custom order id, identical to ref id 747569835. browsed around and found another free mod "numerique" in which you can choose the order id starting point. Combined the two modules gave me identic ref and order ids. i thought it was all in order, until ive made a test order and saw the invoice id still #23. it came as a shock as i thought its related to order id. for now i will just change the invoice number from BO to match my order and ref. number. If any of you got ideas how to make invoice# follow order # it would be great.thanks. it can be achieved through php myadmin database find out the tables related to order and change the value to "int" to get the order or reference number as 747569835. 1 Link to comment Share on other sites More sharing options...
ariopp Posted August 22, 2013 Share Posted August 22, 2013 Just edit the following and change what I put in bold: classes/pdf/HTMLTemplateInvoice.php: line 46: $this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang).sprintf('%06d', $order_invoice->id_order); line 141: return Configuration::get('PS_INVOICE_PREFIX').sprintf('%06d', $this->order_invoice->id_order).'.pdf'; 1 Link to comment Share on other sites More sharing options...
Quanda Posted January 30, 2014 Share Posted January 30, 2014 Hi there, I have a default install of PrestaShop 1.5.6.1 but the code is different to the example above. Could you please advise what to chage on the below in order to get the order numbers to tally up with the invoice numbers. The code I have on line 46: $this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop).sprintf('%06d', $order_invoice->number); // footer informations $this->shop = new Shop((int)$this->order->id_shop); The code I have on line 141: return Configuration::get('PS_INVOICE_PREFIX', Context::getContext()->language->id, null, $this->order->id_shop).sprintf('%06d', $this->order_invoice->number).'.pdf'; Any help is much appreciated. Link to comment Share on other sites More sharing options...
mowax Posted May 8, 2014 Share Posted May 8, 2014 Just edit the following and change what I put in bold: classes/pdf/HTMLTemplateInvoice.php: line 46: $this->title = HTMLTemplateInvoice::l('Invoice ').' #'.Configuration::get('PS_INVOICE_PREFIX', $id_lang).sprintf('%06d', $order_invoice->id_order); line 141: return Configuration::get('PS_INVOICE_PREFIX').sprintf('%06d', $this->order_invoice->id_order).'.pdf'; This works, but it does not change the document name (ie. the name of the pdf file that is attached to emails). It still uses the old numbering system. Also the old invoice number appears in the back-office in the orders page. How can we update these with the above method? Thanks! 1 Link to comment Share on other sites More sharing options...
Recommended Posts