Plugin Contributor
Ewout
(@pomegranate)
Hi Prepu,
You can easily resend the invoice by going to the edit order screen and select “customer invoice” or “Completed order” from the actions. These will resend the email.
I will look into adding a column with the invoice number, although I prefer not to clog the screen with too much unnecessary information. I could make it an option that is turned off by default.
Have a great day!
Ewout
Plugin Contributor
Ewout
(@pomegranate)
Hi Prepu,
Your wish has been heard :o)
Check out the development version here:
http://downloads.wp.xz.cn/plugin/woocommerce-pdf-invoices-packing-slips.zip
It includes a setting to display the invoice number in the orders listing. Let me know what you think!
Kind regards,
Ewout Fernhout
Thread Starter
prepu
(@prepu)
Hi Ewout,
It is great!!! The only thing that I suggest is that perhaps the column is too wide. I mean that if you make slimer you will have more space for the other fields.
http://188.165.218.80/test2/invoice2.jpg
If I find another request I will let you know, hehehe.
Thanks again!
Plugin Contributor
Ewout
(@pomegranate)
I didn’t configure any width for the column (so what you see is the default/auto width), but I will look into making it smaller. It’s probably an easy CSS fix.
Thread Starter
prepu
(@prepu)
Ewout, can you change the file name of the pdf to have the same number of the invoice? Now it is having the order number, not the invoice number (I have choose to start from number 300000).
Thanks again.
Plugin Contributor
Ewout
(@pomegranate)
done! It now reflects the template setting in the development version
In addition, you can create your own filenaming scheme by using the filter wpo_wcpdf_bulk_filename (for bulk export) or wpo_wcpdf_attachment_filename (for the email attachment)
for example:
add_filter( 'wpo_wcpdf_bulk_filename', 'my_pdf_bulk_filename', 10, 4 );
function my_pdf_bulk_filename( $filename, $order_ids, $template_name, $template_type ) {
if (count($order_ids) == 1) {
// single
$order_id = $order_ids[0];
$invoice_number = get_post_meta( $order_id, '_wcpdf_invoice_number', true );
$filename = 'myshopname_' . $template_name . '-' . $invoice_number . '.pdf';
} else {
// multiple invoices/packing slips export
}
return $filename;
}
or
add_filter( 'wpo_wcpdf_attachment_filename', 'my_pdf_attachment_filename', 10, 3 );
function my_pdf_attachment_filename( $filename, $display_number, $order_id ) {
//$display_number is either the order number or invoice number, according to your settings
$filename = 'myshopname_invoice-' . $display_number . '.pdf';
return $filename;
}
be creative!
Thread Starter
prepu
(@prepu)
Great!! Now the space for the invoice column is perfect.
Talking about the codes you wrote before… where do I have to insert exactly those codes? Sorry, but I don’t know almost nothing about programming.
The last thing (just to improve the plugin) is that there is one thing that is not translated in the admin panel. I am talking about the new feature: “Enable invoice number column in the orders list”
I can help you with the spanish translation.
Plugin Contributor
Ewout
(@pomegranate)
Hi prepu,
These pieces of code should go in your theme’s functions.php. The easiest is to put it all the way at the bottom, but make sure that if there is a `?>’ (php closing tag), to put it before that, and also be careful not to put it in other functions.
About the spanish translation, I’d really appreciate it if you could help with the translations! You can either open the spanish .po file in POEdit or give me the translations here and I’ll update it.
Thanks!
Ewout
Thread Starter
prepu
(@prepu)
Hi Ewout, I did’nt have time to test the php code. I will try to do it this weekend.
About the translation, I have download the spanish .po file but I don’t know how to add a new line in english and later translate it. So, if you don’t mind, I will write here the translation.
Enable invoice number column in the orders list = “Activar la columna de número de factura en pedidos”
Yours.
Plugin Contributor
Ewout
(@pomegranate)
Thank you very much! I two other strings that are missing:
“PDF Invoice Number (unformatted!)”
and
“Your WP Memory Limit is currently set to %s – We recommend setting it to at least 64MB (128MB for optimal performance). See: Increasing memory allocated to PHP”
Thread Starter
prepu
(@prepu)
Translation:
PDF Invoice Number (unformatted!) = Número de Factura en PDF (¡sin formato!)
Your WP Memory Limit is currently set to %s – We recommend setting it to at least 64MB (128MB for optimal performance). See: Increasing memory allocated to PHP = Actualmente el límite de memoria de WP está fijado en %s – Se recomienda aumentarlo al menos a 64MB (128 MB para un uso óptimo). Ver: Ampliar memoria dedicada a PHP.
Don’t hesitate if you need something.
Plugin Contributor
Ewout
(@pomegranate)
Thanks alot prepu! I will include these translations in the next release!
it’s possible export number invoice on pdf??
Thread Starter
prepu
(@prepu)