Skip to content

Commit 7710584

Browse files
committed
Merge branch 'rosul-PR-26010' into staging
2 parents a34d8fe + 67a7cd3 commit 7710584

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

source/campaigns/editor/filters.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,8 @@ This example can be used in ``Email sending condition`` of Advocate Offer Email
10181018
qr\_code
10191019
........
10201020

1021-
Converts a string into a QR code image in SVG format.
1021+
Converts a string into a QR code. By default, produces an image in SVG format. If HTML format is specified,
1022+
returns an HTML table, which may be useful for inclusion in emails.
10221023

10231024
.. code-block:: liquid
10241025
@@ -1029,6 +1030,7 @@ Converts a string into a QR code image in SVG format.
10291030
It may take the following arguments:
10301031

10311032
* ``xdim`` - the width of the narrowest bar in a barcode. Thicker bars are multiples of the xdim. Default value is ``4``.
1033+
* ``format`` - custom format for the result. Only ``html`` is supported.
10321034

10331035
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.
10341036

@@ -1040,6 +1042,14 @@ This filter generates a QR code that can be used to encode URLs, text, or coupon
10401042
{{ coupon.code | qr_code: xdim: 6 }}
10411043
</div>
10421044
1045+
To return a QR code as an HTML table that can be embedded in email body, use the custom format:
1046+
1047+
.. code-block:: liquid
1048+
1049+
<div class="qr-code-container">
1050+
{{ coupon.code | qr_code: format: 'html' }}
1051+
</div>
1052+
10431053
|hr|
10441054

10451055
rand\_by

0 commit comments

Comments
 (0)