WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce PDF Invoices & Packing Slips
[resolved] Nice plugin. Some feedback and requests. (7 posts)

  1. Chirag Vora
    Member
    Posted 1 year ago #

    This is the best PDF invoice plugin in Woo-planet!
    Cheers.

    Have 2 quick suggestions to share:

    1. Sequential invoice number should be different from order number and both must be printed on template by default.

    2. Would be nice if black color is not used for table header in the invoices. It utilizes lot on ink if one plans to take a printout. :)

    Thank you!

    https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/

  2. Ewout
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Chirag,
    Thank you for the feedback.

    1. I have decided to display either the invoice number or the order number by default, to keep it simple. You can modify this by creating your own invoice template and then print out both the order number and the invoice number:

    <span class="order-number-label"><?php _e( 'Order Number:', 'wpo_wcpdf' ); ?></span>
    <span class="order-number"><?php $wpo_wcpdf->order_number(); ?></span><br />
    <span class="order-number-label"><?php _e( 'Invoice Number:', 'wpo_wcpdf' ); ?></span>
    <span class="order-number"><?php $wpo_wcpdf->invoice_number(); ?></span><br />

    I am reusing the order-number and order-number-label classes here, but that's ok because the styling is the same anyway (you can change them if you want to apply different styling).
    2. Same as 1. - feel free to create your own modified template. This is a styling decision that I made but it's easy to edit the template. Just open style.css and change the following lines:

    .order-details thead th {
    	color: white;
    	background-color: black;
    	border-color: black;
    }
  3. Chirag Vora
    Member
    Posted 1 year ago #

    Thank you Ewout!
    The first snippet that you mentioned must be placed below

    <span class="order-date-label"><?php echo $display_date_label; ?></span>
    <span class="order-date"><?php echo $display_date; ?></span><br />
    <span class="order-number-label"><?php echo $display_number_label; ?></span>
    <span class="order-number"><?php echo $display_number; ?></span><br />

    or should replace this??

  4. Chirag Vora
    Member
    Posted 1 year ago #

    I mean I am trying to modify the simple template that you've provided by placing it in mytheme/woocommerce/pdf/myfolder

  5. Ewout
    Member
    Plugin Author

    Posted 1 year ago #

    just replace the last two lines. Otherwise one of them gets displayed twice :)
    Don't forget to copy this to your theme folder (/rename the folder) according to the instructions, so that it doesn't get overwritten when you update.

  6. Chirag Vora
    Member
    Posted 1 year ago #

    Alright, I figured it out. For anyone reading this. If you need all four printed: order no., order date, invoice no. and invoice date... Use this in invoice.php

    <span class="order-date-label"><?php _e( 'Order Date:', 'wpo_wcpdf' ); ?></span>
    <span class="order-date"><?php $wpo_wcpdf->order_date(); ?></span><br />
    <span class="order-date-label"><?php _e( 'Invoice Date:', 'wpo_wcpdf' ); ?></span>
    <span class="order-date"><?php $wpo_wcpdf->invoice_date(); ?></span><br />
    <span class="order-number-label"><?php _e( 'Order Number:', 'wpo_wcpdf' ); ?></span>
    <span class="order-number"><?php $wpo_wcpdf->order_number(); ?></span><br />
    <span class="order-number-label"><?php _e( 'Invoice Number:', 'wpo_wcpdf' ); ?></span>
    <span class="order-number"><?php $wpo_wcpdf->invoice_number(); ?></span><br />
  7. Chirag Vora
    Member
    Posted 1 year ago #

    And for most part, there is no need of separate style for them. Simple template is worth its name "SIMPLE" :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic