Display Public Ticket URL As QR Code

  • 24 February 2015
  • 2 replies
  • 26 views

This Freshplug creates a small QR code of the public ticket URL. With a QR scanner , the ticket can be easily accessed




CREATED BY : Nithin David Thomas, Arjun Paliath and Aswin Vayiravan



Code:


   

<style>
#qrcode{
display: block;
text-align: center;
margin-bottom:25px;
}
</style>
<div id="qrcode"><h3 class="heading">QR Code Of This Ticket: </h3></div>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js" ></script>

<script type="text/javascript" >
jQuery(function(){
jQuery('#qrcode').closest('.widget').hide();
jQuery('#qrcode').insertAfter('#due-by-element-parent');
jQuery('#qrcode').qrcode({width: 128,height: 128,text: "{{ticket.public_url}}"});
});
</script>

   




This topic has been closed for comments

2 replies

Is it still working?


Here is a working code (fixed the generator link, no public url):

<style>

#qrcode{

display: block;

text-align: center;

    margin-bottom:25px;

}

</style>

<div id="qrcode"><h3 class="heading">QR Code Of This Ticket: </h3></div>

 

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lrsjng.jquery-qrcode/0.12.0/jquery.qrcode.min.js" ></script>

 

<script type="text/javascript" >

  jQuery(function(){

jQuery('#qrcode').closest('.widget').hide();

    jQuery('#qrcode').insertAfter('#due-by-element-parent');

    jQuery('#qrcode').qrcode({width: 128,height: 128,text: "{{ticket.url}}"});

  });

</script>