Item variations not shown on invoices

WCMp PDF Invoice

Item variations not shown on invoices Resolved

Viewing 11 reply threads
  • Author
    Posts
    • #74975
      admin24
      Participant

      Makes the packing slip useless if it can’t be used to put the correct shirt size in, for example.

    • #75014

      @admin24, we do show the variation inside the packing slip, as you can see here – https://www.loom.com/share/1c9dadba5d9a4c6da33d794ad0cfd95c

      Please make sure the order is also displaying the variation with the product name, only then the same will be displayed.

    • #75023
      admin24
      Participant

      Take another look at your video please.

      The SIZE is not showing in the packing slip, exactly like I told you.

    • #75146

      @admin24, The reason SIZE is not displayed inside Order, because this is not preset by vendor/admin. Menas, cust0mer has selected that option from Single Product page.

      If you refer to this scrrenshot: https://prnt.sc/pcv546, the colors are preset, hence WooCommerce displays that with product name: https://prnt.sc/pcv622. When a user selects the attributes manually, those are added as order meta.

      Now, if you want to display inside the PDF invoice, packing slip, then you may add custom code. If you want, our team will help you out with the hook/filters.

    • #75171
      admin24
      Participant

      Ok yes. Even in your case, that vendor would need to have the size printed on the packing list, or it doesn’t really do anything for them.

    • #75332

      @admin24, our team is looking into this.

      I will keep you posted.

    • #75536

      Hi @admin24,
      Use this code in your current active themes functions.php file for display extra variations.

      
      /** Extra field display on pdf invoice **/
      add_action( 'before_wcmp_pdf_invoice_template_item_meta', 'variation_product_extra_variation_fields' , 10 , 3 );
      function variation_product_extra_variation_fields ( $hook_data_pdf_type, $item, $hook_data_order ) {
         $hidden_order_itemmeta = apply_filters(
                  'wcmp_vendor_dash_hidden_order_itemmeta', array(
             '_qty',
             '_tax_class',
             '_product_id',
             '_variation_id',
             '_line_subtotal',
             '_line_subtotal_tax',
             '_line_total',
             '_line_tax',
             'method_id',
             '_vendor_item_commission',
             'cost',
             'commission',
             '_vendor_id',
             'vendor_id',
             '_vendor_order_item_id',
             'Sold By',
             )
         );
         if ( $meta_data = $item->get_formatted_meta_data( '' ) ) : 
            foreach ( $meta_data as $meta_id => $meta ) :
               if ( in_array( $meta->key, $hidden_order_itemmeta, true ) ) {
               continue;
               }
               ?>
               <li class="item-meta"><span><?php echo wp_kses_post( $meta->display_key );  ?>:</span> <span><?php echo wp_kses_post( force_balance_tags( $meta->display_value ) ); ?></span></li>
      
               <?php
            endforeach;
         endif; 
      }
      Copy
    • #75749
      admin24
      Participant

      I also just noticed that the billing address is on the packing slip instead of the shipping address….

      It looks like that works pretty well on the PDF invoice. How can I also make it work on Packing Slips?

      As an aside, it also is helping me hide other unwanted meta data from the invoice by putting in that meta name. Awesome. I also have this meta showing in the items ordered box, is there a hook to also make it work there?

    • #75793

      Our team will check this.

      I will keep you posted. Kindly provide us some time.

      p.s. Our office will be closed due to holidays (4th to 10th Oct). Hence, the response might get delayed.

    • #76125
      WCMp Admin
      Keymaster

      Hi @admin24, Override wcmp_packing_slip_first_template.php template by copying it to yourtheme/wcmp-pdf-invoices/wcmp_packing_slip_first_template.php

      Then add this code after line no 71 :

      <?php do_action( 'before_wcmp_pdf_invoice_template_item_meta', $hook_data["pdf_type"], $item, $hook_data["order"] ); ?>
      Copy
    • #78905
      admin24
      Participant

      We’re all good! Thanks for your help with this, can close please.

    • #78906
      MOUMITA Haldar
      Participant

      @ admin24,

      Great to know that 🙂

Viewing 11 reply threads

The topic ‘Item variations not shown on invoices’ is closed to new replies.

COVID-19 Outbreak: WCMp team is supporting business affected by coronavirus

Read the Message Buy at Slashed Price