Shopify

  • Create a new template:
    • Go to the admin page → Online Store → Current Theme → Actions → Edit Code
    • Add new template. Select for: collection, give it a nice name (“collectionFor2Performant”)
    • Select all the template text, delete it
    • Add the text below, exactly as it is:
{% layout none %}{% capture newLine %}
{% endcapture %}{% for product in collection.products %}"{{ 
  product.title | replace: '"','""' | strip | truncate: 254 }}","{{ 
  product.description | replace: '</', ' </' | strip_html | strip_newlines | replace: '"', '""' | replace: '  ', ' ' | truncate: 2000 
}}","{{ 
  product.description | replace: '</', ' </' | strip_html | strip_newlines | replace: '"', '""' | replace: '  ', ' ' | truncate: 254
}}","{% if product.compare_at_price %}{{product.compare_at_price | divided_by: 100 }}.{{product.compare_at_price | modulo: 100 }}/{% endif %}{{product.price  | divided_by: 100 }}.{{product.price  | modulo: 100 }}","{%
  if product.type != "" %}{{product.type | replace: '"', '""' | truncate 254 }}{% else %}NoCategory{% endif 
%}","","{{shop.url}}{{product.url}}","{% for image in product.images 
%}{% if forloop.first == true %}{% else %},{% endif %}https:{{image | img_url: '1024x'}}{%
endfor %}","{{product.id}}","0","",{% if product.available %}1{%else %}0{% endif %},""{% if forloop.last == false %}{{ newLine }}{% endif %}{% endfor %}
  • Create a collection with all the products you want to add to your 2Performant Feed.
    • Go to Products and choose Collections submenu and then Create Collection
    • In “collection template” choose the name of the template you created about
  • Click on “View”; it should open a page full of text; copy the address from the browser address bar; that is the URL of your feed for 2Performant
    • the final link should look like this https://<your_store>/collections/<collection_name>
Was this article helpful to you? Yes No