Skip to content

Commit 53a2148

Browse files
committed
Update docs
1 parent 67a7cd3 commit 53a2148

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

source/campaigns/editor/filters.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -996,8 +996,8 @@ This example can be used in ``Email sending condition`` of Advocate Offer Email
996996
qr\_code
997997
........
998998

999-
Converts a string into a QR code. By default, produces an image in SVG format. If HTML format is specified,
1000-
returns an HTML table, which may be useful for inclusion in emails.
999+
Converts a string into a QR code. By default, produces an image in SVG format. If ``png_base64`` format is specified,
1000+
returns a source for an HTML element, containing a base64-encoded PNG image.
10011001

10021002
.. code-block:: liquid
10031003
@@ -1007,8 +1007,8 @@ returns an HTML table, which may be useful for inclusion in emails.
10071007
10081008
It may take the following arguments:
10091009

1010-
* ``xdim`` - the width of the narrowest bar in a barcode. Thicker bars are multiples of the xdim. Default value is ``4``.
1011-
* ``format`` - custom format for the result. Only ``html`` is supported.
1010+
* ``xdim`` - the width of the cell in a QR code. Default value is ``4``.
1011+
* ``format`` - custom format for the result. Only ``png_base64`` is supported.
10121012

10131013
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.
10141014

@@ -1020,13 +1020,11 @@ This filter generates a QR code that can be used to encode URLs, text, or coupon
10201020
{{ coupon.code | qr_code: xdim: 6 }}
10211021
</div>
10221022
1023-
To return a QR code as an HTML table that can be embedded in email body, use the custom format:
1023+
To return a QR code as a base64-encoded PNG that can be embedded in email body, use the custom format:
10241024

10251025
.. code-block:: liquid
10261026
1027-
<div class="qr-code-container">
1028-
{{ coupon.code | qr_code: format: 'html' }}
1029-
</div>
1027+
<img src="{{ coupon.code | qr_code: format: 'png_base64' }}" />"
10301028
10311029
|hr|
10321030

0 commit comments

Comments
 (0)