Upendra Kapse
Forum Replies Created
-
Hello,
Yes, you can include the additional fields in the Invoice. We do have a function that you can use to add your fields using the meta keys for those fields. Please refer to this example function and you can replace the meta keys for your arrival date and time fields in the function to add those fields:
/** * Add this code snippet in functions.php file of your currently active theme. * An example that adds a 'VAT' and 'Customer Number' field to the end of the list. */ function example_custom_order_fields( $fields, $order ) { $new_fields = array(); if( get_post_meta( $order->id, 'your_meta_field_name', true ) ) { $new_fields['your_meta_field_name'] = array( 'label' => 'VAT', 'value' => get_post_meta( $order->id, 'your_meta_field_name', true ) ); } if( get_post_meta( $order->id, 'your_meta_field_name', true ) ) { $new_fields['your_meta_field_name'] = array( 'label' => 'Customer Number', 'value' => get_post_meta( $order->id, 'your_meta_field_name', true ) ); } return array_merge( $fields, $new_fields ); } add_filter( 'wcdn_order_info_fields', 'example_custom_order_fields', 10, 2 );I hope this helps.
Kind Regards,
Upendra.Hi @narthanaj,
First of all, apologies for the delay on this.
And to increase the font size for the elements you mentioned you can add the following code in the functions.php file of your active theme:
function example_customize_invoice() { ?> <style> .invoice .head-item-price, .invoice .head-price, .invoice .product-item-price, .invoice .product-price, .invoice .order-items tfoot { font-size:16px; } .invoice .head-name, .invoice .product-name { font-size:16px; } .invoice .head-quantity, .invoice .product-quantity { font-size:16px; } .invoice .order-items tbody tr:last-child { font-size:16px; } </style> <?php } add_action( 'wcdn_head', 'example_customize_invoice', 20 );And, to remove the email field you can add the following code:
/** * Add this code snippet in functions.php file of your currently active theme. * An example that removes the 'Email' field. */ function example_removed_customer_email( $fields ) { unset( $fields['billing_email'] ); return $fields; } add_filter( 'wcdn_order_info_fields', 'example_removed_customer_email' );Kind Regards,
UpendraHi Glenn,
No, I am afraid that is not a template file that can be overwritten by copying it to the theme. You can keep a backup of the file when you update the plugin so that you can apply the change again on the updated file. This is a small change so shouldn’t be an issue.
Kind Regards,
Upendra.Forum: Plugins
In reply to: [Print Invoice & Delivery Notes for WooCommerce] Multilang PolylangThank you for confirming that.
We will be checking this compatibility for future update of the plugin.
Kind Regard,
Upendra.Forum: Plugins
In reply to: [Print Invoice & Delivery Notes for WooCommerce] Add extra fieldsHello @anadavosagency,
Apologies for the delay in getting back to you on this.
This was an example code snippet that will require changes in it based on which custom field you want to add to the Invoice. Did you make the relevant changes in the above example code snippet to fetch your custom field?
If yes, can you please share the code snippet that you have added and also share the error you get when the site crashes? You will be able to find the error in the error log file on your server or you may have received an email on your admin email address too which will have the exact fatal error due to which the site got crashed. I am guessing there could be some syntax error in your custom function.
Kind Regards,
Upendra.Hi Glenn,
Right now we are using the woocommerce_email_after_order_table hook to display the Print link below the order table in the emails. You will find this in a file named class-wcdn-theme.php which is located under \wp-content\plugins\woocommerce-delivery-notes\includes\ folder.
You can refer to this documentation post which explains which hook applies to which location in the email and change this hook accordingly in the code:
https://www.businessbloomer.com/woocommerce-visual-hook-guide-emails/Kind Regards,
Upendra.- This reply was modified 5 years ago by Upendra Kapse.
Hello @simongcc,
I just tested this on our end by placing a test order and when I tried to print the order from the order received page it just worked fine as you can see in this screenshot: https://prnt.sc/1ggc1d0
So, I am guessing there must be some compatibility issue on your site. Can you check this once by temporarily deactivating other plugins one by one to see if this is happening due to some compatibility issue? Or If the issue still persists can you please share screenshots of your settings like the Print settings, WooCommerc>> Settings>> Accounts & Privacy section, etc?
Kind Regards,
Upendra.Forum: Plugins
In reply to: [Print Invoice & Delivery Notes for WooCommerce] Multilang PolylangHello,
Apologies for the delay in getting back to you on this.
The thing is we have not tested our Print Invoice & Delivery Notes plugin with the Polylang plugin for translation yet but we will test this and see how this works. Do you use Polylang for WooCommerce extension too?
Kind Regards,
Upendra.Hello,
Apologies for the delay on this.
I just tried the code snippet that you have posted on my end again and it worked fine, it will add the coupon code in the Invoice like this: https://prnt.sc/1efcz8j
Please make sure that you add this code snippet either in the functions.php file of your child theme or you can also add it as a snippet using the Code Snippets plugin.
Kind Regards,
Upendra,Hello,
Yes, you can display the text input field you have added above the add to cart button by selecting the Before add to cart button option under WooCommerce>> Settings>> product Input Fields>> General>> Frontend Options>> Position setting.
Kind Regards,
Upendra.Hello,
We have just released a minor update of the plugin v4.6.4, can you please update to this latest version and then check how it is working?
The thing is we have removed a function in v4.6.3 and if you have customized the print template by placing the template file in your theme then you must be getting a fatal error due to which the Invoice was not getting printed. We have fixed this issue in v4.6.4 so please update to the latest version and let us know how it works.
Kind Regards,
Upendra.Hi @webz1lla,
If you want this same field on all the products please go to WooCommerce>> Settings>> Product Input Fields>> All Products section and enable the Product Input Fields – All Products option. This will add a new section named All Products: Field #1 and from there you can set up this text field like this: https://prnt.sc/1dcfsoq
Or if you want this field on only some specific products you can keep the Product Input Fields – All Products option disabled and you can set up the input field at the product level by editing those products.
Hope this helps.
Kind Regards,
Upendra.Forum: Plugins
In reply to: [Currency per Product for WooCommerce] please Compatibility with WCFMHello,
Yes, I am afraid we have not tested this compatibility but we will surely consider checking the compatibility with the WCFM plugin in the future.
Also, if you don’t mind can you please tell us what sort of compatibility you are looking for? You want to let the vendors select the currency for the products they create from their vendor dashboard?
Kind Regards,
Upendra.Hello,
Yes, you will be able to do this with the Product Input Fields plugin. You can add a text field that will appear on your product page and the input data the customer enters in this field while adding the product to the cart will appear in the order when the admin views this order in the backend.
Kind Regards,
Upendra.Forum: Plugins
In reply to: [Print Invoice & Delivery Notes for WooCommerce] Remove email from invoiceGlad to know it worked well 🙂