Show a link to download à file metafield of a product directly in the admin order page

Solved

Show a link to download à file metafield of a product directly in the admin order page

Mariacrea
Visitor
3 0 0

Hello everyone,

 

I would like to know if it is possible to display the link of a file product metafields on the order admin page

I have indeed created a metafild file and would like to be able to retrieve it on my order page, without it being visible to my customers

like this

8wxxquv3do0vxhni3shhegfmxc5w.png
I looked through the different posts a bit and didn't find any suitable solutions.


thank you everyone

Accepted Solution (1)
gr_trading
Shopify Partner
1843 145 193

This is an accepted solution.

@Mariacrea 

 

Mentioned example is for single line metafield, since you are using file type metafield you have to use filter metafield.

 

<input type="text" name="properties[_uniquename]" value="{{product.metafields.custom.uniquename | file_url}}" />

 

Hope this will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee

View solution in original post

Replies 5 (5)

gr_trading
Shopify Partner
1843 145 193

Hi @Mariacrea ,

 

Please refer to the below article to implement the same.

 

https://community.shopify.com/c/shopify-apps/adding-a-hidden-field-that-shows-up-on-individual-order...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
Mariacrea
Visitor
3 0 0

hi @gr_trading 

 

thanks to try to help me find a solution,

the proposed solution does add a field on the admin order page, with the file identifier, but not the direct link to download the file

 

Mariacrea_1-1717331322093.png

 

 

moreover, the linked file identifier seems to be an identifier specific to Shopify and does not allow me to find the file 😞

I'm looking for a solution that would allow me to directly add the download link to the uploaded file on Shopify's servers

 

 

 

gr_trading
Shopify Partner
1843 145 193

This is an accepted solution.

@Mariacrea 

 

Mentioned example is for single line metafield, since you are using file type metafield you have to use filter metafield.

 

<input type="text" name="properties[_uniquename]" value="{{product.metafields.custom.uniquename | file_url}}" />

 

Hope this will help...

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
Mariacrea
Visitor
3 0 0

Hello,

this last code indeed gives me the text of the link.
you have to copy the url and paste it into the browser bar to be able to download the file but it's really a detail...

Many thanks xD

on the other hand I must have an app that prevents the code from working on certain products 😞 I will contact them to see if they can help me ^^

thank you again for your help

gr_trading
Shopify Partner
1843 145 193

glad it helps you can use tag or template to stop working on few product you don’t need app for this.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee