Emarsys - Web Recommender widget template - liquid syntax problem

Solved
justyna_awn
New Member
2 0 0

Hello, All!

I have a problem with Emarsys Web Recommender widgets implementation.
Emarsys is implemented via Shopify app.

I need to implement Web Recommender widget, ex. Home (documentation, live sample). When I'm creating a template (documentation) it is in conflict with liquid syntax. The problem is generated by =SC.link-like kind of variables and I get an error: "Status: 422 Unprocessable Entity Errors: Liquid syntax error (line 14): Unexpected character = in "{{ =SC.link }}"".

Is there any method to solve this problem? Do you have any information about Web Recommender widgets implementation on Shopify?

0 Likes
Bazzar
New Member
1 1 0

This is an accepted solution.

Try wrapping the script around a raw tag. It'll stop the liquid from being parsed. ie

{% raw %}

    <script type="text/html" id="your-id">
    <![CDATA[
        <i>This is my first recommender template</i>.
         <i>We recommend {{=SC.page.products.length}} number of products for You</i>!
    ]]>
    </script>

{% endraw %}

0 Likes