Shopify Email Marketing Automation Custom Liquid

Shopify Email Marketing Automation Custom Liquid

CGKB
Visitor
3 0 1

Hi, I'm wondering if someone can help me with this.

I set up an email marketing automation for 2 weeks after fulfillment. I'd like to request reviews.

I'd like the image and link to be specific to what the customer bought.

I inserted my text, and then I put the following into a custom liquid section below it.

Can anyone tell me if this will work - is my code correct?

Also, how can I test this if the results are based on fulfillment?

When I send a test email now, I only get an email with the text. That may be because my code is wrong, or because I don't meet any of the conditions in the code when I send a test.

If you can give me some insight, I'd greatly appreciate it.

{% assign product1 = false %}
{% for line in fulfillment.line_items %}
  {% if line.title contains 'my-handle1' %}
    {% assign product1 = true %}
  {% endif %}
{% endfor %}
{% capture product1_email %} {% capture product_url %}	https://{{shop.mydomain}}/products/{{product.my-handle1 }}
	{% endcapture %}
  {{ product.featured_image | img_url: '400x400' | img_tag: product.featured_image.alt }}
  {% endcapture %}

  {% assign product2 = false %}
{% for line in fulfillment.line_items %}
  {% if line.title contains 'my-handle2' %}
    {% assign product2 = true %}
  {% endif %}
{% endfor %}
{% capture product2_email %} {% capture product_url %}	https://{{shop.mydomain}}/products/{{product.my-handle2 }}
	{% endcapture %}
  {{ product.featured_image | img_url: '400x400' | img_tag: product.featured_image.alt }}
  {% endcapture %}

 

 

Reply 1 (1)

dreamworldeques
Tourist
10 0 4

any suggestion on this ?

I am also trying to setup exact same thing for my store.