Hi,
I am using otrs 3.3.4 and my problem is - When I print a ticket, There is customer information present in the print page. I want to remove that information. I only want to have ticket information on printed output. Please help me.
Regards,
Gunjan
remove Customer Information from print view
Moderator: crythias
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: remove Customer Information from print view
As you ask a lot of development related stuff (and you seem to be a customer), I recommend that you look for an OTRS developer training. This would save you a lot of time in the end. Then you would be able to answer your questions within minutes 
WRT your question: Have a look at Kernel/Modules/AgentTicketPrint.pm . There you'll find a comment like comment the following block...
How did I come to that solution:
1) See what URL is called when a ticket is printed: http://localhost/otrs/index.pl?Action=AgentTicketPrint
2) See what Action is in that URL ( => AgentTicketPrint)
3) Those Actions are mapped to modules in Kernel/Modules/ -> open Kernel/Modules/AgentTicketPrint.pm
4) Search for anything related to the customer
5) found the above mentioned comment
6) seen that a method is called
7) Have a look at that method, noticed that no config options is requested, so the customer data are always printed. No way to turn it off via SysConfig
Conclusion: comment the call of that method.

WRT your question: Have a look at Kernel/Modules/AgentTicketPrint.pm . There you'll find a comment like
Code: Select all
# output customer infos
How did I come to that solution:
1) See what URL is called when a ticket is printed: http://localhost/otrs/index.pl?Action=AgentTicketPrint
2) See what Action is in that URL ( => AgentTicketPrint)
3) Those Actions are mapped to modules in Kernel/Modules/ -> open Kernel/Modules/AgentTicketPrint.pm
4) Search for anything related to the customer
5) found the above mentioned comment
6) seen that a method is called
7) Have a look at that method, noticed that no config options is requested, so the customer data are always printed. No way to turn it off via SysConfig

Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: remove Customer Information from print view
Actually I also tried the same and it did not work. I ask the questions to confirm my solution and found that what I was doing, was right. Now I don't understand why this is not working!
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: remove Customer Information from print view
When I do it, it works... It would have been nice if you had written what you already have tried. And "it doesn't work" is no proper error message. Are there any log messages?
Was the module reloaded after you made the change? You meant the table "Customer information" on the PDF, didn't you? (Not the customer id in the table with general ticket information)
Can you post a screenshot of the PDF and highlight the things you don't want to print? Can you post the code of the (modified) module? Are you sure you edited the right file (is there a Custom/Kernel/Modules/AgentTicketPrint.pm)?
Was the module reloaded after you made the change? You meant the table "Customer information" on the PDF, didn't you? (Not the customer id in the table with general ticket information)
Can you post a screenshot of the PDF and highlight the things you don't want to print? Can you post the code of the (modified) module? Are you sure you edited the right file (is there a Custom/Kernel/Modules/AgentTicketPrint.pm)?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: remove Customer Information from print view
Hi,
I commented the code in AgentTicketPrint.pm and attached photo is that part of PDF, that I don't want to print.
I commented the code in AgentTicketPrint.pm and attached photo is that part of PDF, that I don't want to print.
You do not have the required permissions to view the files attached to this post.
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: remove Customer Information from print view
You didn't answer my other questions...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de