Accentuate Custom Fields
  • Welcome!
  • Introduction
    • Getting started with ACF
    • Field scopes
    • How to show fields in your storefront
  • Dashboard
    • Reference Manager
      • Creating a new reference within Reference Manager
    • Filter & Group
      • Filter editor
      • Filter usage
    • Activity log
    • App settings
  • Field Definitions
    • Fields & Sections
    • Deciding on a field type
    • ACF Field types
      • Text
      • Markdown text
      • HTML
      • Checkbox
      • Selection
      • Tags
      • Number
      • Date
      • Color
      • Media v1 (legacy)
      • Media v2
      • Custom Object (JSON)
      • Multi-language Text
      • Reference fields
      • References to Global fields
    • Shopify Field types
      • Shopify » Single line text
      • Shopify » Multi-line text
      • Shopify » Boolean
      • Shopify » Color
      • Shopify » Custom objects (JSON)
      • Shopify » URL
      • Shopify » Date
      • Shopify » Date and Time
      • Shopify » Integer
      • Shopify » Decimal
      • Shopify » Weight
      • Shopify » Volume
      • Shopify » Dimensions
      • Shopify » Reference fields
    • Automatic tagging
    • Large sets
    • Field contexts
    • Field context filters
    • Copy and paste fields
    • Change field name and type
    • Import existing fields
    • Linking multiple stores
  • The Editor
    • Using the editor
    • Promote fields to sidebar
    • Layouts
    • Hide from search
    • Repeatable fields
    • Version control
    • Update value on order creation
  • Bulk Import & Export
    • Export custom field values
    • Import custom field values
    • Metaobject export / import
  • METAOBJECTS
    • What are Metaobjects?
    • Metaobject Definitions
    • Metaobject instances / values
    • Displaying Metaobjects on your storefront
    • Metaobject export / import
  • THEME EXTENSIONS
    • SEO keywords
    • Sticky promo bar
    • Products promotion
  • Liquid Guides
    • Learning Liquid
    • Resize & crop images
    • Check for empty values
    • Access field definitions
    • Order notifications
    • Allow customers to change their field values
  • OTHER
    • Webhooks
    • API
      • Access to custom fields
      • Endpoints
  • Help
    • FAQ
      • Why are one of my products no longer showing in my reference field?
      • I have multiple products/variants with the same name
      • How do I make changes to my field values in bulk?
      • I added a new field definition but it is not showing in my storefront
      • How do I copy my field setup to another store?
      • My fields are still showing after I have deleted their field definition
      • Why are none of my fields showing in the editor?
      • My newly created object in Shopify is not available in ACF
      • Reference lists are empty?
      • Why am I seeing a "value cannot exceed 100,000 characters" error when saving?
      • Why can't I name my field "first", "last" or "size"?
    • Need help?
  • Product
    • Changelog
    • Feedback & Suggestions
Powered by GitBook
On this page
  • Shopify Metafield definitions
  • Metafields without definitions
  • Using Shopify Metafields from Liquid
  • Repeatability
  • Transferability
  1. Field Definitions

Shopify Field types

PreviousReferences to Global fieldsNextShopify » Single line text

Last updated 10 months ago

Shopify Metafield definitions

Via your Shopify admin Settings » Custom data, you can optionally create a Metafield definition for a certain namespace + key combination. With a definition in place, the field can be referenced from within Shopify's Theme Customizer as a Dynamic data source and also be "pinned", making it easier to edit the Metafield values in context from your Shopify admin detail page.

Do make sure that any Shopify Metafield definitions and the corresponding ACF field definitions use the same data type. If they do not match, Shopify will block ACF from doing updates to the underlying Metafields.

Also, Shopify Metafield definitions need to be in place for any Shopify » Metaobject reference or Shopify » Mixed reference fields you define. These definitions are responsible for selecting the type of Metaobject(s) that ACF will show the entries for when working in the editor

Do not create Shopify Metafield definitions for any fields in ACF that are not defined as Shopify » ... types (Text, HTML, etc). This will cause Shopify to block ACF from doing updates to the underlying Metafields

ACF will automatically check if a field's data type matches the Shopify Metafield definition (for the namespace + key combination) and show either a green checkmark or a warning icon in the list of defined fields for a scope.

If you have defined a field where no Shopify Metafield definition exists, ACF will just show a grey checkmark to indicate that the field type is valid.

Metafields without definitions

Via your Shopify admin detail page, you can edit metafields regardless of whether a definition is in place or not (section Metafields » View all). For Metafields without a definition, Shopify will make an educated guess of each Metafield's content type.

Please be careful when editing non-Shopify types this way, since ACF's data validation rules are not in effect here

Using Shopify Metafields from Liquid

Metafield values created using a "Shopify » ..." type do not return the value using the normal syntax in Liquid. Rather, these types return a with two properties: type and value. The value property returns the actual value, like this:

<h3>{{ product.metafields.accentuate.subtitle.value }}</h3>

Repeatability

While Shopify » ... (List) types are repeatable by definition, they cannot be part of a repeatable section. This is a restriction in ACF, which will be addressed in an upcoming version.

Transferability

Shopify reference field values cannot successfully be transferred to other stores due to the use of internal Shopify ids, which will vary across stores. File reference fields are an exception here if the same file names exist in the target store.

Metafield object