Page 1 of 1

QR code in Info view does not render data

Posted: 07 May 2026, 10:21
by Nidzo
Phoca Cart 6.1.0Beta12
Joomla 6.1.0

I set {invoiceqr} shortcode in Payment method Info view description but generated QR code does not render
{b_name_first}
{b_name_last}
{b_address_1}
{b_city}
This is how it looks in Mobile Bank Application:
Image

but in PDF sent by email everything is OK. All data, name, address and city is rendered correct.

Re: QR code in Info view does not render data

Posted: 08 May 2026, 17:20
by Jan
Hi, info view does not have option to transform personal data like the personal variables, you can use only payment info like QR code with variable:

{invoiceqr}

Jan

Re: QR code in Info view does not render data

Posted: 08 May 2026, 21:30
by Nidzo
This is exactly the QR code that is found in the Payment Methods description and is found by default after installing Phoca Cart

The short code {invoiceqr} shown does not generate data properly even when I set it to display in the email.

Image

Re: QR code in Info view does not render data

Posted: 12 May 2026, 14:01
by Jan
Hi, are you sure, that Phoca PDF including Phoca PDF Phoca Cart plugin is installed and updated?

Jan

Re: QR code in Info view does not render data

Posted: 12 May 2026, 14:35
by Nidzo
100% sure.
Phoca PDF 5.2.1 and latest Phoca PDF Phoca Cart plugin

QR code in PDF is correct.
Problem is with {invoiceqr} generated code.

This is generated code in Info view after confirming order. Try to scan it.

Image

You will get this from QR code scanner
Image

and this from Bank application
Image

Re: QR code in Info view does not render data

Posted: 13 May 2026, 20:39
by Nidzo
With help of AI I managed to find the problem.

The completeTextFormFields() method, which handles billing/shipping address variable replacement, is not called in two places:

administrator/components/com_phocacart/libraries/phocacart/text/text.php → prepareReplaceText() method — affects Info view
administrator/components/com_phocacart/libraries/src/Mail/MailHelper.php → renderOrderBody() method — affects email

In the PDF pipeline, address variables are replaced correctly because completeTextFormFields() is called before QR code generation.
Fixes I have applied:

Fix for text.php — after completeText() call in the QR code section:

Code: Select all

if (isset($bas['b']) && isset($bas['s'])) {
    $pdf_invoice_qr_code_translated = PhocacartText::completeTextFormFields(
        $pdf_invoice_qr_code_translated, $bas['b'], $bas['s']
    );
}
Fix for MailHelper.php — in renderOrderBody():

Code: Select all

$basB = is_array($displayData['bas']['b']) ? $displayData['bas']['b'] : (array)$displayData['bas']['b'];
$basS = is_array($displayData['bas']['s']) ? $displayData['bas']['s'] : (array)$displayData['bas']['s'];
$qrCodeString = \PhocacartText::completeTextFormFields($qrCodeString, $basB, $basS);

Re: QR code in Info view does not render data

Posted: 15 May 2026, 21:09
by Nidzo
Customer data in QR code was mandatory, but when I checked now, the National Bank of Serbia now marked that option as optional. Bank applications now fill those data automaticaly so there is no need for {b_name_first} {b_name_last} {b_address_1} {b_city} short codes anymore.
https://phoca.cz/forum/viewtopic.php?p=187340#p187340