title: Shopify {{ product.price | money_without_trailing_zeros}}
body: <p>I am new to Shopify.</p>
  <p>I am trying to build a datalayer that can reference the product price on the addtocart event.
  However, the liquid object product.price returns a string without decimals. for example 3499, where the price is 34.99</p>
  <p>I am using the <em>{{ product.price | money_without_trailing_zeros}}</em>  but it returns an empty string.</p>
  <p>I have also tried to use the  <em>{{ current_variant.price | money }}</em> taken from the product-template.liquid but it returns nothing too.</p>
  <p>Here is my attempt:</p>
  <pre><code>&lt;!-- jQuery --&gt;
  &lt;script type=&quot;textjavascript&quot; src=&quot;https://code.jquery.com/jquery-3.4.1.min.js&quot;&gt;&lt;/script&gt;
  &lt;!-- Script --&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
    function fireEvent() {
      var price= {{ product.price | money_without_trailing_zeros}}
      console.log( price)
      // Wait a second for button to initiate.
      setTimeout(function() {      
        // Get div id.
    
    function sendEvent(){
    dataLayer.push({
    'event': 'addToCart',
    'ecommerce': {
      'currencyCode': 'EUR',
      'add': {                                // 'add' actionFieldObject measures.
        'products': [{                        //  adding a product to a shopping cart.
          'name': '{{ product.title }}',
          'id': '{{ product.id }}',
          'price': price ,
          'quantity': 1
         }]
      }
    }
  });
    
    
    }  
    
  document.getElementById(&quot;AddToCart&quot;).addEventListener(&quot;click&quot;, sendEvent)
  
  
  
  }, 3000);
    }
    
    fireEvent();
  &lt;/script&gt;
  </code></pre>
  <p>Any help?</p>