Rashmi Malpande
Forum Replies Created
-
Hi @lfh55
Do you want to remove all prices including the total column? The css I gave will remove the ‘Price’ column from the table in the delivery note.
Can you send me a screenshot of how the delivery note is displayed after adding this code? I am a bit confused as to how you want it to be displayed.
Please let me know.
Regards,
RashmiHi @glepera2
The plugin does not have this functionality currently. You will have to add some custom code to do this. You can use the filter ‘woocommerce_my_account_my_orders_actions’ to add the button on the My Account page.
Add the following code in your theme’s functions.php file –
add_filter( ' woocommerce_my_account_my_orders_actions', 'delivery_button_account_page', 10, 2 ); function delivery_button_account_page( $actions, $order ) { if( get_option( 'wcdn_print_button_on_my_account_page' ) == 'yes' ) { $wdn_order_id = ( version_compare( get_option( 'woocommerce_version' ), '3.0.0', ">=" ) ) ? $order->get_id() : $order->id; $actions['print-delivery'] = array( 'url' => wcdn_get_print_link( $wdn_order_id, 'delivery-note' ), 'name' => __( 'Print Delivery Note', 'woocommerce-delivery-notes' ) ); } return $actions; }
Let me know if you have any problems.
Regards,
Rashmi- This reply was modified 7 years ago by Rashmi Malpande.
Thank you. We are glad you liked the plugin and find it useful.
Do you want to hide the Price column from the delivery note?
You can do this using css. Copy the ‘style.css’ from wp-content/plugins/woocommerce-delivery-notes/templates/print-order to wp-content/themes/yourtheme/woocommerce/print-order.Add the following css to hide the Price Column –
.delivery-note .head-item-price, .delivery-note .product-item-price, .delivery-note .total-item-price{ display: none; }
Please let me know if this worked for you.
Regards,
RashmiForum: Plugins
In reply to: [Print Invoice & Delivery Notes for WooCommerce] Delivery NoteHi @lindalim
If you want to add custom css, copy the ‘style.css’ from wp-content/plugins/woocommerce-delivery-notes/templates/print-order to wp-content/themes/yourtheme/woocommerce/print-order. Add the css in the copied file, so that even if you update the plugin your changes won’t be lost.
Hope this works for you. Let me know if you find any problems.
Regards,
RashmiHi @peesen87
You can change the format of the shipping address using a filter called ‘wcdn_address_shipping’.
Add the following code in your theme’s functions.php file –
add_filter( 'wcdn_address_shipping', 'change_address_shipping' , 10, 2 ); function change_address_shipping( $shipping_address, $order ) { $countries_obj = new WC_Countries(); $countries = $countries_obj->get_countries(); $states = $countries_obj->get_states(); $shipping_country = $order->get_shipping_country(); $shipping_state = $order->get_shipping_state(); $shipping_address = $order->get_formatted_shipping_full_name(); $shipping_address .= "<br>". $order->get_shipping_address_1(); $shipping_address .= "<br>". $order->get_shipping_address_2(); $shipping_address .= "<br>".$order->get_shipping_postcode()." - ". $order->get_shipping_city(); $shipping_address .= "<br>". $states[$shipping_country][$shipping_state]; return $shipping_address; }
You can change the format from here. Let me know if this worked for you.
Regards,
Rashmi