Need help with {%if} with custom liquid on product page

Hi all,

I’m trying to add metafield images and a metafield link if the metafield is present on my product page with a custom url on my default product page.

I’ve tried many times, and its not working; it keeps giving me error.

Here’s the original code: {%if%} Someone can help.

Available at

@JGTQM2018 - try this

### Available at 
{% if product.metafields.custom.product_urlamz !=blank %}

{% endif %}

### Available at 

{% if product.metafields.custom.product_urlamz and product.metafields.custom.product_imgamz %}
  
    
  
{% else %}
  

Link or image not available.

{% endif %}

try to use this code.