• Resolved mrfoameruk

    (@mrfoameruk)


    I have tried the code snippet (via the snippets plugin) advised in one of the posts (now closed) to just change the line to ( $template_type == ‘invoice’ ” and couldn’t get it to do anything. Maybe things have changed with the plugin, but i don’t know the code and think the advice is incorrect. ie to me the 1st line seems to say packing list (wf_pklist….)

    <?php
    
    add_filter( 'wf_pklist_add_custom_css', 'wf_pklist_alter_product_image_size', 10, 2 );
    function wf_pklist_alter_product_image_size( $custom_css, $template_type )
    {
    if( $template_type == 'invoice' )
    {
    $custom_css .= ".wfte_product_table_body .image_td img { max-width:70px !important; max-height:70px !important; }";
    }
    return $custom_css;
    }

    should wf_pklist be wf_invoice. and i also take it that changing 70px to 200px will give a bigger thumbnail in the invoice.

    Never heard of code snippets before so trying to figure it out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @mrfoameruk,

    Thanks for reaching out.

    Can you try using this code snippet instead of the above and check?

    add_filter( 'wf_pklist_add_custom_css', 'wf_pklist_alter_product_image_size', 10, 2 );
    function wf_pklist_alter_product_image_size( $custom_css, $template_type )
    {
    	if( $template_type == 'invoice' )
    		{
    			$custom_css .= ".wfte_product_table_body .image_td img { width:70px !important; height:70px !important; }";
    		}
    	return $custom_css;
    }
    Thread Starter mrfoameruk

    (@mrfoameruk)

    That worked a treat. Changed the 70px to 90px and the invoices look great.

    Thanks

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @mrfoameruk,

    We are happy to have helped you. If you like the plugin and support, please?leave us a review here.?It would really help us spread the word. Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘image size on invoice’ is closed to new replies.