• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Template Roll Printer with options (for 2.2.6, 2.3, 2.3.4, 2.4.0, 2.4.4)

Captive Portal
34
90
37.8k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    AYSMAN
    last edited by Mar 21, 2018, 2:54 AM

    Hi,

    The privilege for voucher printing only does not show in the list of user  privileges in version 2.4.2

    Thanks

    1 Reply Last reply Reply Quote 0
    • N
      netx34
      last edited by Mar 3, 2019, 4:07 AM

      any tutorial using arduino to print voucher over server on pfsense, connected to pfsense allowing to send and recieve vouchers

      1 Reply Last reply Reply Quote 0
      • D
        DanieleIT
        last edited by Apr 11, 2019, 8:22 PM

        Hello,
        My pfsense installation died today. So I had to reinstall and update PfSense to the latest 2.4.4 version. Of course I had to update the voucher roll printer to support 2.4.4.

        I also fixed the broken links for older version.
        Le me know!

        Ciao

        1 Reply Last reply Reply Quote 0
        • I
          iorx
          last edited by Sep 2, 2019, 11:27 AM

          Hi, (sorry for necroposting here).

          Excellent and awesome! Kudos for keeping it working still in 2.4.4.

          Brgs,

          1 Reply Last reply Reply Quote 0
          • N
            naiksawan
            last edited by Dec 13, 2019, 6:23 AM

            You rock!!! this is what i was looking for long... Dear one suggestion, can you add some more code to display serial no. 1,2... on coupon generated. please do let me know..
            Many thanks.

            1 Reply Last reply Reply Quote 0
            • I
              iorx
              last edited by Dec 13, 2019, 9:20 AM

              Hi,

              Here is quick hack, apply to services_captiveportal_vouchers_print.php

              $countofvouch = 0;
              Is the counter and you see your self where it does its thing.

              //print_r($sizes); /*for debugging*
              $i = 0;
              $countofvouch = 0;
              
              $maxid = count($sizes);
              
              echo "<div id='vouchers'>";
              		
              foreach ($sizes as $k => $v) 
              {
              	$thisVoucherDuration = $voucherDuration;
              	$printThis = 1;
              	
              	if ($useRollMinutes == '1')
              		$thisVoucherDuration = getvalidity($v);
              	
              	if ($printUnusedOnly == '1')
              		if (getvalidityMinutes($v) == 0) 
              			$printThis = 0;
              	
              	if ($printThis == 1) {
              		echo "<div class='voucher'><div class='title'>#".$countofvouch.", ".$voucherTitle."</div><div class='logo'><img alt='Logo' src='voucherfiles/logo.png'></div><div class='info'>".$voucherInfo."</div><div class='vcode'>{$v}</div><div class='vtime'>".$thisVoucherDuration."</div><div class='vexpire'>".$voucherExpiration."</div></div>"; $i++;
              		$countofvouch = $countofvouch + 1;
              		
              		if ($i == 21) {
              			echo "<div class='page-break'></div>";
              			$i = 0;
              		}
              	}
              }
              

              Looks like this:
              login-to-view

              N 1 Reply Last reply Dec 14, 2019, 8:43 AM Reply Quote 1
              • N
                naiksawan @iorx
                last edited by Dec 14, 2019, 8:43 AM

                @iorx your are awesome dear... its worked for me. thank you very much. God bless.

                1 Reply Last reply Reply Quote 0
                • M
                  mohkhalifa
                  last edited by Dec 14, 2019, 6:11 PM

                  Thank you so much
                  Very nice ☺

                  1 Reply Last reply Reply Quote 0
                  • N
                    naiksawan
                    last edited by Dec 16, 2019, 6:30 AM

                    This post is deleted!
                    G 1 Reply Last reply Dec 16, 2019, 7:51 AM Reply Quote 0
                    • G
                      Gertjan @naiksawan
                      last edited by Dec 16, 2019, 7:51 AM

                      @naiksawan said in Template Roll Printer with options (for 2.2.6, 2.3, 2.3.4, 2.4.0, 2.4.4):

                      i have installed liquidsquid pkg and report i am getting is jst IP address log. could

                      What ??

                      And what has this to do with the subject :
                      Template Roll Printer with options (for 2.2.6, 2.3, 2.3.4, 2.4.0, 2.4.4)
                      ?

                      No "help me" PM's please. Use the forum, the community will thank you.
                      Edit : and where are the logs ??

                      1 Reply Last reply Reply Quote 0
                      • N
                        naiksawan
                        last edited by Dec 16, 2019, 7:57 AM

                        as said in comment just asked...

                        1 Reply Last reply Reply Quote 0
                        • G
                          Gertjan
                          last edited by Dec 16, 2019, 8:04 AM

                          The thing is :
                          Ok to ask the question but the fact that people watching this thread and (getting notified) wind up with questions related to
                          "liquidsquid pkg and report"
                          Not printer ticket rolls etc.
                          So you won't have any answers.

                          liquidsquid (nad the needed Squid) usage is a totally different subject - and a complex one - because proxying on a captive portal is .... very complicated to combine with the captive portal.

                          See also the Squid forum.

                          No "help me" PM's please. Use the forum, the community will thank you.
                          Edit : and where are the logs ??

                          N 1 Reply Last reply Dec 16, 2019, 8:40 AM Reply Quote 0
                          • N
                            naiksawan @Gertjan
                            last edited by Dec 16, 2019, 8:40 AM

                            @Gertjan thank you very much for suggestion. i am new here so just learning from mistake...

                            1 Reply Last reply Reply Quote 0
                            • T
                              Tommao
                              last edited by Nov 13, 2020, 9:27 AM

                              Hi Daniele,
                              I tried to install the script in version 2.4.4 following your instructions, but I don't understand why the print is blank without any content: can you help me?

                              1 Reply Last reply Reply Quote 0
                              • viktor_gV
                                viktor_g Netgate
                                last edited by Feb 7, 2021, 11:27 AM

                                Feature request created:
                                https://redmine.pfsense.org/issues/11379

                                1 Reply Last reply Reply Quote 0
                                • A
                                  AYSMAN @DanieleIT
                                  last edited by Aug 1, 2022, 8:51 AM

                                  @danieleit Hi, I was using this customization with pfsense+ 22.01 and it works great! however upon updating to 22.05 when trying to print using the custom print icon I got this error

                                  Fatal error: Cannot redeclare get_captive_portal_logo() (previously declared in /etc/inc/captiveportal.inc:46) in /etc/inc/captiveportal.inc on line 46 PHP ERROR: Type: 1, File: /etc/inc/captiveportal.inc, Line: 46, Message: Cannot redeclare get_captive_portal_logo() (previously declared in /etc/inc/captiveportal.inc:46)
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • F
                                    FSC830
                                    last edited by FSC830 Dec 7, 2022, 11:17 AM Dec 7, 2022, 11:14 AM

                                    Yes, I know, its an reeeeally old thread running since years, and usually I dont do necroposting...

                                    But just to let you now that at least the 2.4.4 files are running in pfSense CE 2.6 as well as in pfSense+ 22.01 and 22.05. 👍

                                    Tested in a virtual pfSense and at a SG-3100 Appliance.

                                    Only thing to modify to avoid the error in prevoius post (Cannot redeclare...) is to replace the line "require("captiveportal.inc");" with "require_once("captiveportal.inc");" in the .php file(s).

                                    Hopefully it runs in future version too. 😊

                                    Regards

                                    1 Reply Last reply Reply Quote 1
                                    • D
                                      DanieleIT @DanieleIT
                                      last edited by Apr 18, 2023, 1:49 PM

                                      I've found the time to check the scripts in the new 2.6.0 version. I cannot edit the OP anymore (due to limitations from netgate).

                                      Update (18/04/2023):

                                      • 2.6.0 Version (credits to FSC830 for the require_once fix)

                                      Voucher-Template-Printer-2.6.0.zip

                                      1 Reply Last reply Reply Quote 3
                                      • D
                                        Dmc
                                        last edited by Dmc Jan 28, 2025, 1:22 PM Jan 28, 2025, 1:22 PM

                                        Is this still functional?

                                        I tried to use it on the latest 2.7.2 version with no success

                                        A 1 Reply Last reply Jan 28, 2025, 1:47 PM Reply Quote 0
                                        • A
                                          AYSMAN @Dmc
                                          last edited by Jan 28, 2025, 1:47 PM

                                          @dmchavoc hi. Yes it is. Did you get any errors?

                                          D 1 Reply Last reply Jan 29, 2025, 12:33 PM Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.