Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor 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;
    }

    Thread Starter Chirag Vora

    (@chirag740)

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

    Thread Starter Chirag Vora

    (@chirag740)

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

    Plugin Contributor 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.

    Thread Starter Chirag Vora

    (@chirag740)

    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 />
    Thread Starter Chirag Vora

    (@chirag740)

    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.