Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Adding URL Metafield to Customer Account

Adding URL Metafield to Customer Account

iammshop
Visitor
3 0 0

 

Hey,

 

I'm trying to add a URL metafield to customer account page with no luck. The goal is to allow customers to re-download their digital products from the account page. 

 

Here is the code I added to the account.liquid page:

 
<td>
{% for line_item in order.line_items %}                   
{{ line_item.title | link_to: product.metafields.my_fields.download | url }} <br/>                                  
{% endfor %} 
</td>

The above successfully lists the purchased products on the account page with a link, but when you click on the product link, nothing happens (it just reloads the page).

 

I am not sure what I am missing? I assume I'm missing some code to callup the metafield data, but not sure how to go about it.

 

Any help would be greatly appreciated. 

 

Thank you,

Reply 1 (1)

hammocks4life
Visitor
3 0 0

I'm also trying to do this. I'm using Customer Hub App for accounts right now if that's helpful. Or I can remove it and use Shopify's default.