Support » Plugin: WooCommerce PDF Invoices & Packing Slips » Nice plugin. Some feedback and requests.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ewout

    (@pomegranate)

    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;
    }

    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??

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

    Plugin Author Ewout

    (@pomegranate)

    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.

    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 />

    And for most part, there is no need of separate style for them. Simple template is worth its name “SIMPLE” 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Nice plugin. Some feedback and requests.’ is closed to new replies.