11

Dynamic Metafields

Rupali

Last Update 1 เดือนที่แล้ว

The Smart app allows creating highlights (or badges) that display the value of any product metafield created by other apps.


The product metafields can be displayed by adding the {{smarthm.namespace.key}} dynamic data field in the highlight text. Here namespace.key needs to be replaced with the actual metafield namespace and metafield key names.


For example - If you have metafield with the namespace 'instructions' and key 'wash' then to display the value of this metafield, add text {{smarthm.instructions.wash}}.


You can combine Product Metafield Display Conditions with Dynamic Metafields to create powerful rules that display metafield data based on your rules.

Below are a few examples of product metafield representations that may be helpful.

Metafield TypeProduct Metafield Representation
Product{{ smarthm.custom.product.value }}
Collection{{ smarthm.custom.collection.value }}
Money {{ smarthm.custom.price.value | money }}
Single Line Text{{ smarthm.custom.stock.value }}
Multi Line Text{{ smarthm.custom.specs.value | newline_to_br }}
Rich text{{ smarthm.custom.rich_text | metafield_tag }}
Multi Line text {{ smarthm.custom.alphanumeric.value }}
Validations{{ smarthm.custom.validation.value }}
Weight{{ smarthm.custom.product_weight.value }}
Volume{{ smarthm.custom.volume.value }}
Dimension{{ smarthm.custom.dimension.value }}
Decimal {{ smarthm.custom.price_in_decimal.value }}
Integer List{{ smarthm.custom.agelist.value | join:'<br>' }}
Integer Single{{ smarthm.custom.age.value }}
Single Line Text (list) {{ smarthm.custom.specifications_of_product.value | join:'<br>' }}
File<a target='_blank' href='{{ smarthm.custom.file.value.url}}'>{{ smarthm.custom.file.value.url | split: '/' | last | split:'?' | first }}</a>
Date and Time{{ smarthm.custom.datetimesingle.value | date: '%A, %B %d, %Y at %l:%M %p %Z' }}

Note:

  • Dynamic Metafields are available for Pro Plan and above users only.
  • If the account is downgraded after adding Highlights having Dynamic Metafields, then those Highlights will stop being displayed.

Was this article helpful?

0 out of 0 liked this article