Template Roll Printer with options (for 2.2.6, 2.3, 2.3.4, 2.4.0, 2.4.4)
-
Hi Daniel,
thanks for your answer. Yes i edited the file directly via ssh and got no browsercash running. I also saw that the printing was from browser to browser different. So i just did it with zooming in printing. Another thing for me would be great. Any chance to print an bar or qr-code as well?
-
Hi,
This looks very strange to me. The CSS is the only file that acts on the template. You should check again, as you may missing something.
For the barcode, check my previous post #18 and the jsfiddle. -
for me the zooming function in printing is fine. i really tried this, and i saw the difference in printing-funktion per browser.
regarding to the barcode… http://jsfiddle.net/Idioblast/3j1mnwe3/
which files do i have to edit. sorry for the stupid question, but i read the post and the fiddle but this not clear to me
-
i think the js-code is to put somewhere around here, but where exactly :/
if ($printThis == 1) { echo "".$voucherTitle."![Logo](voucherfiles/logo.png)".$voucherInfo."{$v}".$thisVoucherDuration."".$voucherExpiration.""; $i++; if ($i == 21) { echo ""; $i = 0;
-
for me the zooming function in printing is fine. i really tried this, and i saw the difference in printing-funktion per browser.
regarding to the barcode… http://jsfiddle.net/Idioblast/3j1mnwe3/
which files do i have to edit. sorry for the stupid question, but i read the post and the fiddle but this not clear to me
Ini the "services_captiveportal_vouchers_print.php" file, line 49, you'll find the opening tag, in the head just add a link to the js file (download: http://barcode-coder.com/js/jquery-barcode-last.min.js) and put in in the same folder as the .css file and others. Then add the javascript code you can fine in Jsfiddle at the end, before the closing body tag.
-
for me the zooming function in printing is fine. i really tried this, and i saw the difference in printing-funktion per browser.
regarding to the barcode… http://jsfiddle.net/Idioblast/3j1mnwe3/
which files do i have to edit. sorry for the stupid question, but i read the post and the fiddle but this not clear to me
Ini the "services_captiveportal_vouchers_print.php" file, line 49, you'll find the opening tag, in the head just add a link to the js file (download: http://barcode-coder.com/js/jquery-barcode-last.min.js) and put in in the same folder as the .css file and others. Then add the javascript code you can fine in Jsfiddle at the end, before the closing body tag.
Of which file?
-
Just if anybody else gets the problem. the barcode-part from js was not executed no matter where i put the code… i needed the following line in frint to be sure it will be executed:
$(document).ready(function() {
in context:
-
Hi and great work.
Is there any chance we could have the Print button put on:
Status / Captive Portal / Zone / Voucher Rolls
instead of (or in addition to) Services / Captive Portal / Zone / Vouchers ?
I'd like to be able to give users only the permission for printing tickets, but at the moment I have to give them access to services to get to the print button.
I.E. an extra column for Actions with the Print button.Thanks.
-
Hey mates, i need help about the way to install vouchergenerator, i could not find the way, please help…
-
Hey mates, i need help about the way to install vouchergenerator, i could not find the way, please help…
Hello, inside the zip file you have a readme.txt file you can follow step by step. If you don't know how to upload or overwrite the files, it's easy, you just need an SCP client to connect to the pfsense (just like FTP). From windows you can use winSCP to setup a connection to the pfsense IP using SCP protocol.
-
i could not find the ''readme.txt file'' you were talking about, and the here is not guiding on how to install vouchergenerator, please here is my email address bejoedson@gmail.com, send me all the file and tutorial there, please. i just need a way on how to design and print voucher code from pfsense
-
i could not find the ''readme.txt file'' you were talking about,….
It's in the ZIP file.
Called "readme.txt" :CAPTIVE PORTAL VOUCHERS PRINT TEMPLATE ------------------------------------------------------------------------------ By Daniele Arrighi <daniele.arrighi@gmail.com>Credits: Reward Gagarin <rewardgms@gmail.com>Ikkuranus ------------------------------------------------------------------------------ 1\. Edit css file to fit your needs and overwrite logo.png with your onw logo 2\. in /usr/local/www/ overwrite services_captiveportal_vouchers.php 3\. in /usr/local/www/ upload services_captiveportal_vouchers_options.php and services_captiveportal_vouchers_print.php 4\. create a new folder named: "voucherfiles" (without ", case sensitive) 5\. upload voucherfiles directory's files in the newly created directory 6\. Print from Services -> Captive Portal -> Vouchers Extra: If you want people with more limited accounts to print out vouchers without having full access to the WebUI add the portalprint.priv.inc file in the /etc/inc/priv/ folder.</rewardgms@gmail.com></daniele.arrighi@gmail.com>
-
Thank You very Much, i am going to try it and give You feedback. Thanks again…
-
Hi there,
since my last printing there were about 6 month gone. Everything was finde. Now i need more vouchers printed. And at "Captive Portal -> Vouchers" there is no more button to rpint :( I did not change anything - expect i did a reboot. All files are at place. I'm really struggeling :(
Any help would be wonderful
-
You upgraded last 6 months ?
If so, that explains …If not, redo what you did before : install the files etc.
-
yes i did upgrade. and the file services_captiveportal_vouchers.php was replaced by original.
-
yes i did upgrade. and the file services_captiveportal_vouchers.php was replaced by original.
You'll need to reinstall the plugin.
Please make a backup of the original services_captiveportal_vouchers.php file as I cannot assure compatibility for versions > 2.3…
If it works, let me know otherwise I'll have to work on it as soon as I have some spare time. :'(Thanks
-
-
Very Nice, this code is absolutely outstanding.
Is there any chances to get it working on versions 2.3.x or 2.4? I am looking for this feature a long time ago and this code would fit every need I have related to the voucher system.
I don't even know how to do it wrong when it comes about coding.
Can you help us @DanieleIT.
Best Regards
Michel Braga Guimarães
-
Hello,
It should already work for 2.3.x. Let me know if you can test it!
For 2.4 I'll have to check as soon as I have some spare time.
I'll let you know in this topic.
Ciao
-
Ok.. I had some spare time today :P ;D
Added 2.3.4 and 2.4.0 version (community edition).
Installation method is the same as usual.
Please check opening post for more details, instructions and downloads.Let me know if you are having problems with this.
Ciao
-
Prints only a blank page to me (2.4.0) :-/ (Voucher roll with 21 vouchers)
Edit: Should not name roll# with leading zeros like "0001". All good now.
-
function convertToHoursMins($time, $format = '%02d:%02d') { if ($time < 1) { return; } $days = floor($time / 60 / 24); $hours = floor($time / 60); $minutes = ($time % 60); //return sprintf($format, $hours, $minutes); if ($hours > 24 && ($hours % 24) > 0) return $days." days(s) and ".$hours." hours(s)"; if ($hours > 24) return $days." days(s)"; if ($hours < 1) return $minutes." minute(s)"; if ($hours >= 1 && $minutes == 0) return $hours." hour(s)"; if ($hours >= 1 && $minutes > 0) return $hours.":".$minutes. " hours(s)"; }
Slight mod for it to handle "days" (and "hours", not tested). But days work.
Other thing. Is it possible to make package out of this? (I've got no experience in making such, but there is probably a good wiki on the subject, haven't searched yet.)
Brgs,
-
Hi,
The privilege for voucher printing only does not show in the list of user privileges in version 2.4.2
Thanks
-
any tutorial using arduino to print voucher over server on pfsense, connected to pfsense allowing to send and recieve vouchers
-
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
-
Hi, (sorry for necroposting here).
Excellent and awesome! Kudos for keeping it working still in 2.4.4.
Brgs,
-
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. -
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:
-
@iorx your are awesome dear... its worked for me. thank you very much. God bless.
-
Thank you so much
Very nice -
This post is deleted! -
@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)
? -
as said in comment just asked...
-
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.
-
@Gertjan thank you very much for suggestion. i am new here so just learning from mistake...
-
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? -
Feature request created:
https://redmine.pfsense.org/issues/11379 -
@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)
-
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