In the "Resources" section there are files with the names .jsand .js.liquid.
What is the difference between 2 that I should use if I want to include a js file in a theme?
This is in the .js.liquid file right now. I would like to build a string consisting of a liquid variable. when I add this line inside the DOM element, it does not seem to appear.
var someString = '';
{%for line in order.line_items%}
someString += 'q='+{{line.quantity}}+'&p='+{{line.product.id}}+'&pp='+{{line.price}}+'&w='+{{line.grams}}+'&i='+{{line.product.featured_image|product_img_url|url_param_escape}}+'&n='+{{line.product.title|url_param_escape}}+'&';
{%endfor%}
$('body').append(someString);
guest source
share