Support » Plugin: PDF Invoices & Packing Slips for WooCommerce » Create second PDF with different header

  • Resolved Gerdski

    (@gerdski)


    Hello,

    we would like to add a second button to download/create a second PDF. The template would be a a copy of the default template, placed in the templates folder and slightly modified so Users can choose which PDF they want. (possibly both.)

    Maybe this can be done by giving this second button an extra GET variable ($myvar=1) that is not present in the original button, and on PDF creation ask for this parameter, like

    if ( (isset($myvar)) && ($myvar==1) )
    $template_to_use =”mynewtemplate.php”;
    else
    $template_to_use =”originaltemplate.php”;
    make_pdf($template_to_use);

    Of course, the above is my own interpretation of the working of your plugin 🙂 … but maybe you can point me to the right direction, towards the right files and variable names?

    Thanks 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Create second PDF with different header’ is closed to new replies.