{{ product.metafields.myfields.myfield.updated_at }} | Shopify Liquid | Metafields

TheDeveloperFrontend

I wanted to ask if it is possible to show the time when a metafield was updated using Shopify Liquid. I tried these ways:

{{ product.metafields.myfields.myfield.updated_at }}
{{ product.metafields.myfields.myfield.updatedAt }}

But neither of those work.

I would very hope someone can help me.

Bye!

David Lazar

It is not possible with Liquid. Shopify does not expose the updated_at date of a resource like a Metafield. You get access to the Metafield attributes they figure matter.

If you absolutely had to know, the long-winded approach would be to render the Metafield ID (not sure you can do that, but you can try anyway), and assuming you got that, you could call an App Proxy with that ID and assuming your App installed in the store had any permissions on the resources assigned the Metafield, you might be able to read the updated_at date using an API call. You could then respond with JSON and do as you wish with that date. Like I said. Long-Winded

TL:DR; No. You do not get to play with dates on metafield resources.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Loading Shopify Product Metafields in snippets

Access JSON lumps in metafields with Shopify Liquid templates

Shopify Liquid - Can You Get a Specific Page's Metafields On A Product Page?

How to loop through the metafields in liquid

How to create a shopify metafields editor app?

How to decrease latency when getting product.metafields through the shopify Ruby gem?

Use Product Metafields from Stencil in BigCommerce

Can I update shopify customer metafields now through theme file?

Is there any way to add metafields data on the homepage of shopify site?

Shopify: Metafield API -- is it possible to allow users to edit metafields from the account page?

Creating multiple metafields with different key showing Error

Product price calculations in Shopify Liquid

Shopify liquid product.thumbnail.liquid repeats block even there is no loops

Shopify / Liquid - inserting product recommendations onto cart page

Displaying the current collection on a product info page (shopify liquid)

How to determine if a product is part of a hidden collection in Shopify liquid templates?

Access image metafield inside product.liquid in Shopify

Hide specific product in Shopify with Liquid based on customer tags

How to get particular product image in shopify liquid file?

Shopify Liquid: If Statement

Shopify Liquid Object Rules

Liquid Template Shopify Not Rendering

Whitespace control in Shopify Liquid

How to interpolate in liquid shopify

Integrate Bootstrap on .liquid ( shopify )

Shopify liquid: differences between {% %} and {%- -%}

Shopify: Which LIQUID file to look for to add a logo between product tabs section and related products section?

How to style text product-template.liquid and put an oval around depending on text length Shopify

Get change of cart when cart update product at header section Shopify liquid