diff --git a/source/campaigns/editor/filters.rst b/source/campaigns/editor/filters.rst index cf3d07f7d..259a6dc21 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 ``png_base64`` format is specified, +returns a source for an HTML element, containing a base64-encoded PNG image. .. code-block:: liquid @@ -1006,7 +1007,8 @@ 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``. +* ``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. @@ -1018,6 +1020,12 @@ 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 a base64-encoded PNG that can be embedded in email body, use the custom format: + +.. code-block:: liquid + + + |hr| rand\_by