Start a new topic
Answered

Payment form problems

In the CartController I inspect the WorkContext.PaymentFormHtml, and it contains really nice code as expected:


<div><div id="klarna-checkout-container" style="overflow-x: hidden;">

    <script type="text/javascript">

    /* <![CDATA[ */

        (function(w,k,i,d,n,c,l,p){

            w[k]=w[k]||function(){(w[k].q=w[k].q||[]).push(arguments)};

            w[k].config={

                container:w.document.getElementById(i),


When this hits my webpage through the very simple view "payment-form" it is distorted like this:


<div><div id="klarna-checkout-container" style="overflow-x: hidden;">

    <script type="text/javascript">

    /* <![CDATA[ */

        (function(w,k,i,d,n,c,l,p){

            w[k]=w[k]||function(){{w[k].q=w[k].q||[]).push(arguments}};

            w[k].config={

                container:w.document.getElementById(i),


Note the paranthese has changed to a curly bracket, leaving me with a syntax error. Is this Liquid parsing?

Tried wrapping it in a {% raw %}, but that displayed the liquid tag on my page, indicating that everything in the variable should not be liquid parsed at all.


Best Answer

There was an ambiguation between default Angular markup and Liquid markup. So instead of '{{ }}' for Angular was used '{( )}'. In render-time all these sequences were replaced back to '{{ }}' on-the-fly (for Angular plugins compatibility reasons). That's why you've got this issue. For now described ambiguity is resolved and with the nearest release your problem should gone.

1 Comment

Answer

There was an ambiguation between default Angular markup and Liquid markup. So instead of '{{ }}' for Angular was used '{( )}'. In render-time all these sequences were replaced back to '{{ }}' on-the-fly (for Angular plugins compatibility reasons). That's why you've got this issue. For now described ambiguity is resolved and with the nearest release your problem should gone.

Login or Signup to post a comment