AnsweredAssumed Answered

Trouble integrating Affirm to Shopify

Question asked by Marco Sanchez on Dec 30, 2019
Latest reply on Jan 2, 2020 by Heidi Hess-Bynum

Hello, I am having trouble adding the first line of code to my shopify store ( product.liquid ) 

Copy the line of HTML shown below and paste it underneath the code that displays the price in your product.liquid or product-template.liquid file, whichever is used in your environment. Note, you may need to adjust the variable passed in the data-amount attribute to match the one currently used in your store. Other common price variables include:
  • {{item.price}}
  • {{product.price}}
  • {{current_variant.price}}
" <p class="affirm-as-low-as" data-page-type="product" data-amount="{{variant.price}}"></p>   "
I do not know where to add it?  
here is my code 
<!-- /templates/product.liquid -->
{% comment %}
The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}

{% section 'product-template' %}


{% comment %}
<!--Start Stamped.io Auto Installation--><div id="stamped-main-widget" class="stamped-main-widget" data-widget-style="standard" data-product-id="{{ product.id }}" data-name="{{ product.title | escape }}" data-url="{{ shop.url }}{{ product.url }}" data-image-url="{{ product.featured_image | product_img_url: "large" |replace: '?', '%3F' | replace: '&','%26'}}" data-description="{{ product.description | escape }}" data-product-sku="{{product.handle}}">{{ product.metafields.stamped.reviews }}</div><!--End Stamped.io Auto Installation-->
{% endcomment %}  

Outcomes