How to save metafield value to customer note?

Jòóst
Excursionist
23 1 6

I would like to save metafield value from customer_fields.btw_nummer to Customer note

Replies 5 (5)

thynk_devs
Tourist
6 0 1

Hello! You'll need to code in liquid on the cart page to be able to do this. Do you feel confident navigating your shop's code?

◦ Top #4 most liked Shopify Partner available for hire!
◦ Replace apps with copy/paste code snippets & save money.
Jòóst
Excursionist
23 1 6

Yes,I do 😉 Where do I place?

thynk_devs
Tourist
6 0 1
  1. Access Your Shopify Admin: Log in to your Shopify account and navigate to the admin dashboard.

  2. Go to Theme Editor: In the Shopify admin, go to "Online Store" > "Themes".

  3. Edit Your Theme Code: Find the theme you're currently using and click on the "Actions" dropdown menu. Then, select "Edit code".

  4. Locate the Cart Template: In the left sidebar, find the "Sections" or "Templates" folder depending on your theme structure. Look for a file named something like cart.liquid or cart-template.liquid. This is the file that controls the layout and functionality of your cart page.

  5. Display the Metafield: Once you've opened the cart template file, find the section where you want to display the metafield. You can display it next to each product line item, for example.

    Use Liquid code to retrieve the metafield value for each product in the cart. You can do this using the product.metafields object. Here's an example of how you might display a metafield called "additional_information":

    {% for item in cart.items %} {% assign product = item.product %} {% if product.metafields.custom_fields.additional_information %} <p>{{ product.metafields.custom_fields.additional_information }}</p> {% endif %} {% endfor %}


    You will need to use a Flow action to add this data from the order into the order note.

◦ Top #4 most liked Shopify Partner available for hire!
◦ Replace apps with copy/paste code snippets & save money.
Jòóst
Excursionist
23 1 6

Sorry, I wasn't total clear what I wanted 😉
This metafield is created in app Forms. This metafield value is what I want to ad to the Customer Account Note

Brett_Helium
Shopify Partner
228 44 97

Hey @Jòóst!

Brett here from the Helium Customer Fields team, it sounds like you may be using our app to collect this value. If you are using the Customer Fields app, you can actually do this directly in the app's built in note editor. You can check out our guide for this or reach out to our support team if you need further assistance:

 

https://help.heliumdev.com/en/articles/3649580-customer-note-editor

support@heliumdev.com

Brett | Helium
Helium builds apps that thousands of merchants depend on:
- Customer Fields ✪✪✪✪✪ (330+ reviews)
- Meteor Mega Menu ✪✪✪✪✪ (250+ reviews)