Condition in custom button PDF

MichalD

New member
Hi,
I need to have confition:
If current user is from group 1 (admin) or 2 generate PDF from template ORDER
else generate PDF from template ORDEREU

I tryed make that in function dadabik_create_pdf (from manual) but that doesen't work :(

Please help me
 

eugenio

Administrator
Staff member
Hello,
I am not sure what you are referring to with dadabik_create_pdf, but this old post explains how to create a custom button that export to PDF using a specific template:


in your case, you could create instead a custom PHP page where you set the template according to the group (using the global variable $current_id_group) and then redirect to the PDF page as the post explan.

Best,
 
Top