Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! It depends on what needs to be in the manifest. The easiest way to do this is by creating a custom template and adding the manifest as a second page to the packing slip.

    Hope that helps!
    Ewout

    Thread Starter sammzand

    (@sammzand)

    I want manifest just after the packing slip data in the same page.Can it be done?

    Plugin Contributor Ewout

    (@pomegranate)

    Yes, with some custom code: PDF template action hooks

    Thread Starter sammzand

    (@sammzand)

    As it is for packing slip which hook should I use?

    Plugin Contributor Ewout

    (@pomegranate)

    all of the hooks have a $template_type variable which you can use to determine which template to apply this to. if you’re making many of these changes it’s easier to create a custom template and edit the files directly.

    Ewout

    Thread Starter sammzand

    (@sammzand)

    Thanks for the feedback..

    I just want 4 values in the manifest after packing slip details.I have used this hook.But how to fetch these values..

    add_action( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_custom_text', 10, 2 );
    function wpo_wcpdf_custom_text ($template_type, $order) {
        if ($template_type == 'packing-slip') {
        ?>
        <div class="custom-text">
    <table style="width:100%">
    <tr>
        <th>Order Id</th>
        <th>Buyer Name & Address</th>
        <th>Product Name</th>
        <th>Signature</th>
      </tr>
    <tr>
        <td><?php echo $order->id; ?></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
    
    </table>
        </div>
        <?php
        }
    }

    Kindly check above just need the values as mentioned in the code…

    Plugin Contributor Ewout

    (@pomegranate)

    You can access all the order information via the $order object.

    Name & address: $order->get_formatted_shipping_address()
    Products: $order->get_items() (this returns an array, from which you need to extract the names yourself)

    Good luck!
    Ewout

    Thread Starter sammzand

    (@sammzand)

    Fixed!

    Plugin Contributor Ewout

    (@pomegranate)

    Great, glad to hear that 🙂

    Have a fantastic day!
    Ewout

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘manifest required’ is closed to new replies.