From 67a7cd3c5968e40371c8e94058cedf838d4b7e23 Mon Sep 17 00:00:00 2001 From: Hanna Rosul Date: Tue, 2 Dec 2025 13:23:19 +0200 Subject: [PATCH 1/2] [PR-26010] Update qr_code filter doc --- source/campaigns/editor/filters.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/source/campaigns/editor/filters.rst b/source/campaigns/editor/filters.rst index cf3d07f7d..d702926fc 100644 --- a/source/campaigns/editor/filters.rst +++ b/source/campaigns/editor/filters.rst @@ -996,7 +996,8 @@ This example can be used in ``Email sending condition`` of Advocate Offer Email qr\_code ........ -Converts a string into a QR code image in SVG format. +Converts a string into a QR code. By default, produces an image in SVG format. If HTML format is specified, +returns an HTML table, which may be useful for inclusion in emails. .. code-block:: liquid @@ -1007,6 +1008,7 @@ Converts a string into a QR code image in SVG format. It may take the following arguments: * ``xdim`` - the width of the narrowest bar in a barcode. Thicker bars are multiples of the xdim. Default value is ``4``. +* ``format`` - custom format for the result. Only ``html`` is supported. This filter generates a QR code that can be used to encode URLs, text, or coupon codes. The QR code is returned as an SVG image that can be directly embedded in HTML. @@ -1018,6 +1020,14 @@ This filter generates a QR code that can be used to encode URLs, text, or coupon {{ coupon.code | qr_code: xdim: 6 }} +To return a QR code as an HTML table that can be embedded in email body, use the custom format: + +.. code-block:: liquid + +
+ {{ coupon.code | qr_code: format: 'html' }} +
+ |hr| rand\_by From cbaf47d7365c31aeadbc0a17bcf467d41a28c5df Mon Sep 17 00:00:00 2001 From: Hanna Rosul Date: Tue, 2 Dec 2025 18:06:23 +0200 Subject: [PATCH 2/2] Update docs --- source/campaigns/editor/filters.rst | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/source/campaigns/editor/filters.rst b/source/campaigns/editor/filters.rst index d702926fc..259a6dc21 100644 --- a/source/campaigns/editor/filters.rst +++ b/source/campaigns/editor/filters.rst @@ -996,8 +996,8 @@ This example can be used in ``Email sending condition`` of Advocate Offer Email qr\_code ........ -Converts a string into a QR code. By default, produces an image in SVG format. If HTML format is specified, -returns an HTML table, which may be useful for inclusion in emails. +Converts a string into a QR code. By default, produces an image in SVG format. If ``png_base64`` format is specified, +returns a source for an HTML element, containing a base64-encoded PNG image. .. code-block:: liquid @@ -1007,8 +1007,8 @@ returns an HTML table, which may be useful for inclusion in emails. It may take the following arguments: -* ``xdim`` - the width of the narrowest bar in a barcode. Thicker bars are multiples of the xdim. Default value is ``4``. -* ``format`` - custom format for the result. Only ``html`` is supported. +* ``xdim`` - the width of the cell in a QR code. Default value is ``4``. +* ``format`` - custom format for the result. Only ``png_base64`` is supported. This filter generates a QR code that can be used to encode URLs, text, or coupon codes. The QR code is returned as an SVG image that can be directly embedded in HTML. @@ -1020,13 +1020,11 @@ This filter generates a QR code that can be used to encode URLs, text, or coupon {{ coupon.code | qr_code: xdim: 6 }} -To return a QR code as an HTML table that can be embedded in email body, use the custom format: +To return a QR code as a base64-encoded PNG that can be embedded in email body, use the custom format: .. code-block:: liquid -
- {{ coupon.code | qr_code: format: 'html' }} -
+ |hr|