Shopify Q&A | Online Store 2.0 Metafields: What's The ‘JSON’ Content Type?

Поділитися
Вставка
  • Опубліковано 14 жов 2024
  • Aron introduces the JSON content type and its features for inputing JSON format content in the back end of your online Shopify store.
    Want to display your metafields in the front-end of your store? Check out our video on creating metafields:
    • Shopify Q&A | Online S...
    ___________________
    Subscribe for more guides, tutorials and tips:
    bit.ly/2HMedia...
    Follow 2H Media on LinkedIn:
    bit.ly/3hM27Xw
    Check out our website for step by step guides:
    2h.media/guides/
    #Shopify #ShopifyTutorial #Ecommerce #Metafields

КОМЕНТАРІ • 3

  • @mangotango7284
    @mangotango7284 3 роки тому +2

    Could you please provide an example of a use case scenario when it would be better to use a JSON array as opposed to using individual metafields to store data?

    • @2HMediaMarketing
      @2HMediaMarketing  3 роки тому +1

      Good question. I think use cases for a JSON array as opposed to individual metafields are few and far between. Off the top of my head, most of them would come down to how the data is gathered. For example, if you were integrating with a piece of software that is capable of exporting a JSON array, this might allow a simple copy-paste. Similarly, if your data was in a csv file, you could use a script to generate a JSON array, once-again allowing for a simple copy/paste but in that case, I'd probably just use an app like Matrixify to import the data and stick with individual metafields.
      Other than that, the key value of this data type is that Liquid deserializes the data to an iterable array - In principle, this is similar to having numerous individual metafields within a namespace (which is also iterable), but I suppose this new data type would allow for a further degree of nesting since multiple json metafields could exist within the same namespace.
      I may revise my stance on this data type after I've encountered more use cases in my day to day, but for now, as you seem to have picked up, I believe individual metafields will do the job and create a more intuitive user experience for most merchants.

    • @JammondMusic
      @JammondMusic 3 роки тому +1

      @@2HMediaMarketing thank you for your insight!