Barcode problem

  • DuckieTM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago - 3 years 10 months ago #144296 by DuckieTM
Replied by DuckieTM on topic Barcode problem
joomdonation.com/forum/events-booking-ge...need-your-input.html

A long time ago you provided me the info to get barcode working ..... :(
Last edit: 3 years 10 months ago by DuckieTM.

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #144297 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Barcode problem
Yes. I asked for the input and later, implemented QRCODE support and use it to checkin registrants. I have never implemented support for [BARCODE]. You cannot find anywhere from our product description or from documentation say that we support BARCODE

So again, that's something added by you or the person who customized the extension use on your own site only.

Please Log in or Create an account to join the conversation.

  • DuckieTM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #144298 by DuckieTM
Replied by DuckieTM on topic Barcode problem
No worries then i need to fix this myself, strange that it isn't support standaard barcode's but oke.....

this is the way to get normal barcode's
go to registration.php and replace the following:

Please Log in or Create an account to join the conversation.

  • DuckieTM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago - 3 years 10 months ago #144299 by DuckieTM
Replied by DuckieTM on topic Barcode problem
No worries then i need to fix this myself, strange that it isn't support standaard barcode's but oke.....

this is the way to get normal barcode's
go to registration.php and replace the following:
Code:
if (!file_exists(JPATH_ROOT . '/media/com_eventbooking/qrcodes/' . $filename))         {             require_once JPATH_ADMINISTRATOR . '/components/com_eventbooking/libraries/vendor/phpqrcode/qrlib.php';             $config     = EventbookingHelper::getConfig();             $Itemid     = EventbookingHelperRoute::findView('registrants', EventbookingHelper::getItemid());             $checkinUrl = EventbookingHelper::getSiteUrl() . 'index.php?option=com_eventbooking&task=registrant.checkin&id=' . $registrantId . '&Itemid=' . $Itemid;             $qrcodeSize = (int) $config->get('qrcode_size') ?: 3;             QRcode::png($checkinUrl, JPATH_ROOT . '/media/com_eventbooking/qrcodes/' . $filename, QR_ECLEVEL_L, $qrcodeSize);         }

With 
Code:
if (!file_exists(JPATH_ROOT . '/media/com_eventbooking/qrcodes/' . $filename))         {             require_once JPATH_ROOT . "/components/com_eventbooking/tcpdf/tcpdf_barcodes_1d.php";             // set the barcode content and type             $barcodeobj = new TCPDFBarcode($ticketNumber, 'C39');             // output the barcode as PNG image             imagepng($barcodeobj->getBarcodePNG(2, 30, array(0,0,0)));             $img = ob_get_clean();             file_put_contents(JPATH_ROOT . '/media/com_eventbooking/qrcodes/' . $filename, $img);         }
Last edit: 3 years 10 months ago by DuckieTM.

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #144300 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Barcode problem
Thanks for sharing the code. Could you upload the modified file here? I will see if It could be implemented using override so that you don't have to re-do that modification when you update to future releases of the extension

Tuan

Please Log in or Create an account to join the conversation.

  • DuckieTM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago - 3 years 10 months ago #144338 by DuckieTM
Replied by DuckieTM on topic Barcode problem
 
I would like to send you the code but the Attachments isn't doing it, also changed .php to .txt

on line 4423 change the function to :
Code:
public static function generateQrcode($registrantId)     {         // Support override generateQrcode         if (EventbookingHelper::isMethodOverridden('EventbookingHelperOverrideRegistration', 'generateQrcode'))         {             EventbookingHelperOverrideRegistration::generateQrcode($registrantId);             return;         }         $filename = $registrantId . '.png';         if (!file_exists(JPATH_ROOT . '/media/com_eventbooking/qrcodes/' . $filename))         {             require_once JPATH_ROOT . "/components/com_eventbooking/tcpdf/tcpdf_barcodes_1d.php";             // set the barcode content and type             $barcodeobj = new TCPDFBarcode($registrantId, 'C39');             // output the barcode as PNG image             imagepng($barcodeobj->getBarcodePNG(2, 30, array(0,0,0)));             $img = ob_get_clean();             file_put_contents(JPATH_ROOT . '/media/com_eventbooking/qrcodes/' . $filename, $img);         }     }
Last edit: 3 years 10 months ago by DuckieTM.

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #144340 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Barcode problem
Could you please zip the file? That should be allowed to upload

Tuan

Please Log in or Create an account to join the conversation.

  • DuckieTM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 7 months ago #146144 by DuckieTM
Replied by DuckieTM on topic Barcode problem
Here is the file, the location is :
components\com_eventbooking\helper
Attachments:

Please Log in or Create an account to join the conversation.

  • DuckieTM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 7 months ago #146145 by DuckieTM
Replied by DuckieTM on topic Barcode problem
This will work on the latest version, i am just trying to figure out how to get the ticketnumber in there instead of the ID

Please Log in or Create an account to join the conversation.

  • DuckieTM
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 7 months ago #146146 by DuckieTM
Replied by DuckieTM on topic Barcode problem
This will work on the latest version, i am just trying to figure out how to get the ticketnumber in there instead of the ID

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc