Display the SKUs of the products on the invoice and the delivery note

WCMp PDF Invoice

Display the SKUs of the products on the invoice and the delivery note Resolved

Viewing 4 reply threads
  • Author
    Posts
    • #100432
      kevajo
      Participant

      Display the SKUs of the products on the invoice and the delivery note

    • #100548

      @kevajo, may I know what are you referring to as “Delivery Note”, a scrrenshot will be very much appreciated.

    • #100566
      kevajo
      Participant

      I have attached an example of an invoice or delivery note.
      We would like the SKUs of the products to appear on the invoices and delivery slip to facilitate the collection of the product.

      Attachments:
    • #100596
      abhirup
      Moderator

      Hi,
      for display the SKUs of the products on the invoice
      please add this code in the function.php of the current active theme :

      add_action( 'after_wcmp_pdf_invoice_template_item_meta','wcmp_pdf_invoice_add_SKU',10,3);
      function wcmp_pdf_invoice_add_SKU($pdf_type,$item,$order){
      	$product = $item->get_product();
      	if($product->get_sku()){
      	?>
      	<ul class="meta">
      		<li class="item-meta"><span><?php echo __('SKU','wcmp-pdf_invoices'); ?>:</span> 
      		<span><?php echo __($product->get_sku(),'wcmp-pdf_invoices'); ?></span>
      		</li>
      	</ul><?php
      	}
      }
      Copy

      for display the SKUs of the products on the delivery note
      Override wcmp-pdf_invoices/templates/wcmp_packing_slip_first_template.php template by copying it to yourtheme/wcmp-pdf-invoices/wcmp_packing_slip_first_template.php
      add this code after line no 86

      <?php $product = $item_obj->get_product();
             if($product->get_sku()){
         ?>
                <ul class="meta">
                  <li class="item-meta"><span><?php echo __('SKU','wcmp-pdf_invoices'); ?>:</span> 
                  <span><?php echo __($product->get_sku(),'wcmp-pdf_invoices'); ?></span>
                  </li>
                </ul>
      <?php } ?>
      Copy
    • #107045
      abhirup
      Moderator

      We have not received any update from you for a long. Hope this ticket is already been resolved.

      We are now closing this ticket. Kindly create a new one if you need any further help.

Viewing 4 reply threads

The topic ‘Display the SKUs of the products on the invoice and the delivery note’ is closed to new replies.

Buy all Marketplace addons together, check out our Bundle

Buy at Slashed Price