• hi, we need to edit the packing slip with few line words like below for my staf to sign on each progress handling stage so we can know who is checking on each stage.

    can u gv me a code to edit the few line words below remarks in parking slip ?

    1. 影印 : [________________] 2. 配貨 : [________________]

    3. 檢貨 : [________________] 4. 包貨 : [________________]

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor kluver

    (@kluver)

    Hi @wwmummygrab,

    You can use the following code snippet for that:

    add_action ( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_add_custom_lines', 10, 2 );
    function wpo_wcpdf_add_custom_lines( $template_type, $order ) {
    	if ($template_type == 'packing-slip' ) {
    		echo "<p>1. 影印 : [________________] 2. 配貨 : [________________]</p>";
    		echo "<p>3. 檢貨 : [________________] 4. 包貨 : [________________]</p>";
    	}
    }

    This code snippet should be placed in the functions.php of your child theme. If you have never worked with code snippets or functions.php before please read this: How to use filters

    Also note that our plugin does not work with all characters right out of the box. Sometimes it is necessary to add a custom font. More in formation here: Using custom fonts

    Thread Starter wwmummygrab

    (@wwmummygrab)

    OKAY IT WORKS…. THANKS… BY THE WAY, HOW CAN I ADD SPACE IN BTW THE OPTION IN SAME LINE ?

    I TRY SPACE IT BUT DOESNT TAKE EFFECT… IT SEEMS TO USE CODE RIGHT ?

    MEANS BTW 1 AND 2 I MIGHT NEED 5 SPACE , HOW CAN I DO IT ?

    Plugin Contributor kluver

    (@kluver)

    Hi @wwmummygrab,

    You could adapt the snippet a bit and add some elements to get more control over the layout like this:

    add_action ( 'wpo_wcpdf_after_order_details', 'wpo_wcpdf_add_custom_lines', 10, 2 );
    function wpo_wcpdf_add_custom_lines( $template_type, $order ) {
    	if ($template_type == 'packing-slip' ) { ?>
    		<style type="text/css">
    			.packing-slip div.signatures p span:first-child { padding-right:10mm; }
    		</style>
    
    		<div class="signatures">
    			<p>
    				<span>1. 影印 : [________________]</span>
    				<span>2. 配貨 : [________________]</span>
    			</p>
    			<p>
    				<span>3. 檢貨 : [________________]</span>
    				<span>4. 包貨 : [________________]</span>
    			</p>
    		</div>
    	<?php }
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to edit packing slip’ is closed to new replies.