SlideShare une entreprise Scribd logo
1  sur  104
Télécharger pour lire hors ligne
Shopify Partner Social
Melbourne 2017
Rhys Furner
Shopify
Jason Bowman
Shopify
Metafield Madness
What is a metafield and
why should I care about
them?
Because saying they are awesome
isn't often a good enough reason
How can metafields
help you?
Maybe we'll talk a little about apps too
Some healthy warnings on
Metafields usage.
Just because you can use them
doesn't mean that you should
What is a metafield and why
should I care about them?
https://help.shopify.com/themes/liquid/objects/metafield
Let's start with the basics: The metafields object allows
you to store additional information for products,
collections, orders, articles, pages, customers and your
shop. You can output metafields on your storefront
using Liquid.
Namespace + Key
product.metafields.tabs.specs
metafields: {
tabs: {
specs: 'value',
photos: 'image1.jpg,image2.jpg'
}
}
https://help.shopify.com/themes/liquid/objects/metafield
{%- assign tabs = product.metafields.tabs -%}
<ul class="tabs">
<li>{{ product.description }}</li>
{%- for field in tabs -%}
<li>{{ field | first }}: {{ field | last }}</li>
{%- endfor -%}
</ul>
Basic code example.
Product code would be prettier and
check for valid metafield namespaces
1. Extends data fields, to complement or override
2. Avoids alternate templates to simplify theme files
3. Avoids abusing tags (remember the 1000 limit)
4. Avoids adding hacks in the description*
5. Maintains a pretty content structure
6. Keeps content hidden away**
7. They're awesome.
* sometimes these hacks are a good thing
** not always a good thing
How can metafields help you?
Migrations. Other platforms
may have custom fields that
show on the storefront.
Knowing you can map this data in the migration
makes for an easier project win.
Design touches like colour
theming. Blue product has
blue buttons, blue text.
A metafield can store a hex code that's
then used to output an inline style
https://www.covetnation.com/products/occ-cosmetic-pencil-pool-boy
{%- if product.metafields.style.colour != blank -%}
{%- assign mColour = product.metafields.style.colour -%}
<style>
.add-to-cart {
background: {{ mColour }}
}
</style>
{%- endif -%}
Grab the hex code, add some css
Tabs and extra content.
Basic extra content, in different places
{%- assign tabs = product.metafields.tabs -%}
<ul class="tabs">
{% include 'product-description' %}
{%- for field in tabs -%}
<li><h2>{{ field | first }}</h2>{{ field | last }}</li>
{%- endfor -%}
{% include 'related-products' %}
</ul>
Basic code example.
Product code would be prettier and
check for valid metafield namespaces
Delivery timeframes,
backorder dates,
Units sold (with bar)...
Knowing you can map this data in the migration
makes for an easier project win.
{% if backorder != blank %}<div>This item is backordered, and will
ship in {{ backorder }}</div>{% endif %}
<div class="stock-sold-bar">
<span data-start="{{ startCount }}" data-stock="{{ currentCount }}"
data-percent="{{ soldPercent }}"></span>
</div>
http://freakdesign.com.au/blogs/news/17335317
Dynamic layouts. Not as
sexy as sections, but still
super handy.
Add lots of custom sections, and create a unique
per product layout
Customer personalisation.
Use tags when you can, but
metafields take things next
level.
Customer preferences FTW
Inventory location.
Multi-location inventory is
coming. Until then
Metafields can help...
https://www.deadstock.ca/products/puma-tsugi-netfit-puma-black
{%- assign locations = product.metafields.locations -%}
{%- assign items = locations | split: ';' -%}
<ul class="store-location">
{%- for item in items -%}
{% assign stock = item | split:',' %}
<li>{{ stock | first }}: {{ stock | last }}</li>
{%- endfor -%}
</ul>
Simplified version, but you get the
general idea.
Related anything.
Nested anything.
Grouped anything
Related products. Related collections.
Nested collections. Products in articles.
{%- assign r = product.metafields.related.items | split:"," -%}
<div class="related-products">
{%- for p in r -%}
{% assign relatedProduct = all_products[p] %}
{%- include 'some-snippet' product: relatedProduct -%}
{%- endfor -%}
</div>
This could be easier to read.
{%- assign cParent = product.metafields.col.parent -%}
{%- assign cChild = product.metafields.col.child -%}
<div>
{%- if collections[cChild].products.size > 0 -%}
{%- include 'collection-loop' with collections[cChild] -%}
{%- endif -%}
</div>
This could be easier to read.
SEO control. Set custom
canonical urls and meta
tags with metafields.
Related products. Related collections.
Nested collections. Products in articles.
Hide items from the
sitemap.
Related products. Related collections.
Nested collections. Products in articles.
To add noindex and nofollow
meta tags to an object's
pages, create a new
metafield for the object with
the following attributes:
https://help.shopify.com/api/tutorials/updating-seo-data
"namespace" : "seo"
"key" : "hidden"
"value" : 1
"value_type" : "integer"
Cost of Goods.
I see a few people asking for a way to store COGs.
This can help.
Best practice and healthy
warnings on Metafields usage.
Should the metafield even
live in Shopify?
Think smart about the data usage and how you're going to store it. Many things
would be better in their own offsite database. Others in built in options.
Not well supported in the
Admin. You must rely on
apps and third party tools.
Only the bulk product editor has the
ability to edit metafields
https://www.shopify.com/partners/blog/53573123-secrets-of-the-shopify-bulk-editor
Metafields are not
returned in Admin or
Storefront search.
Storefront can be helped with apps,
or AJAX search methods (if the SKU count is small)
API call limits are a real
thing. Are you considering
that in your dev flow?
How many metafields are you saving?
How many per object? How often will you update?
100 values in 1 metafield faster than 100 individual metafields
Metafields don't work in
Shopify Scripts.
How many metafields are you saving?
How many per object? How often will you update?
Apps and info
Document your usage for
the merchant and fellow
dev in the theme.
Nothing worse than digging through some complex theme to find there's a pile of
custom content being pulled in from a metafield.
More
1. Shopify Bulk Editor (built in metafield editing)
2. Shopify Apps (search for metafields)
3. Extensions like ShopifyFD or Custom Fields
4. xporter app
5. https://help.shopify.com/themes/liquid/objects/metafield
6. https://help.shopify.com/api/reference/metafield
7. https://www.shopify.com/partners/blog/110057030-using-metafiel
ds-in-your-shopify-theme
Gavin Ballard
Disco
HACKING
THE
CHECKOUT
RESPONSIBLY ENHANCING
THE
CHECKOUT
augment user
experience
capture necessary
information
consistent brand
experience
augment user
experience
capture necessary
information
consistent brand
experience
interfering/replacing
user experience
capturing
unnecessary
information
changing the flow
1-PAGE

CHECKOUT

MYTH
1-PAGE

CHECKOUT

MYTH
http://bit.ly/2quoVOj
CUSTOM

CHECKOUT

EXAMPLE
CUSTOM

CHECKOUT

HOW-TO
checkout.liquid
driven by javascript
{%- capture HTML_AUTOCOMPLETE_RESULTS_MESSAGE -%}

<li class="ui-menu-item ui-menu-item--message">

<span>

<span class="ui-menu-item--message__action" data-act=“show-address">{{ 'shopify.checkout.custom.error' | t }}</span>

{{ 'shopify.checkout.custom.autocomplete_results_message' | t }}

</span>

</li>

{%- endcapture -%}
<!-- Initialise custom checkout. -->

<script type="text/javascript">

(function(YoufoodzCheckout, $, Shopify) {



// Define options that will be passed to each module on initialization.

var options = {

TEMPLATES: {

HTML_DISABLED_DISCOUNTS_MESSAGE: {{ HTML_DISABLED_DISCOUNTS_MESSAGE | json }},

HTML_DELIVERY_ADDRESS_SUBTITLE: {{ HTML_DELIVERY_ADDRESS_SUBTITLE | json }},

HTML_KNOWN_SUBURB_PROMPT: {{ HTML_KNOWN_SUBURB_PROMPT | json }},
driven by javascript
page event pattern +
modules
page event pattern +
modules
$(document).on('page:load page:change', function() {

$.each(YoufoodzCheckout.modules || [], function(index, module) {

if(module.steps.indexOf(Shopify.Checkout.step) !== -1) {

// If on the shipping method page and rates haven't yet returned, do

// nothing.

if(Shopify.Checkout.step === 'shipping_method' && $('[data-poll-refresh]').length) {

return;

}



// Otherwise, initialise the module.

initializeModule(module, options);

}

});

});
cart attributes
THANKS! @gavinballard
Bodog Olah
Createur
Why Use Advanced Search?
✓ Faster
✓ More Relevant
✓ Better Merchandising
✓ Analytics
✓ Faster, Higher Conversions
✓ Better UX
Autocomplete
• Provide value in results
• Remove clutter
• Obsess about relevance
• Refine synonyms
• Analyse data
• Modify results
Filters
• Use existing data, if possible
• Survey customers about how
they refine searches
• Set realistic min max
boundaries
• Test for speed
• Customise sort order on a per-
result set basis
• Boost the results you want
• Push down the results you
don’t
• Decide between OR / AND
• Allow easy toggling of
selections
• Make good use of UI elements
Information / Guides
• Separate results in different
categories within the same
collection
• Index informational results
alongside shopping results
Results Picker
• Guide by selection for people
who need prompting
• Think like your customers
• Provide quick, contextual
updates
• Show counts with selects
Autocomplete Suggestions
• Suggest common terms
• Customise layout elements for
your audience
Advanced Filtering
• Consider your audience
• Show relevant data in results
• Contextual searches with
dropdowns
• Advanced filtering based on
category
Cheap & Easy Autocomplete
• Algolia app
Email me at
bodog@createur.com
5 minute break
🍕
🍻
🕒 🚽
Cal Wilson
The Working Party
Q&A
Who’s Hiring?
Thanks for coming!
🍕
🍻
📋 🚽

Contenu connexe

Similaire à Shopify Partner Social

Gail villanueva add muscle to your wordpress site
Gail villanueva   add muscle to your wordpress siteGail villanueva   add muscle to your wordpress site
Gail villanueva add muscle to your wordpress sitereferences
 
How to Create Module to Track Affiliate Conversions?
How to Create Module to Track Affiliate Conversions?How to Create Module to Track Affiliate Conversions?
How to Create Module to Track Affiliate Conversions?damienwoods
 
Progressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficadaProgressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficadaCaelum
 
APIs for catalogs
APIs for catalogsAPIs for catalogs
APIs for catalogsX.commerce
 
Extending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHPExtending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHPrandyhoyt
 
Html 5, a gentle introduction
Html 5, a gentle introductionHtml 5, a gentle introduction
Html 5, a gentle introductionDiego Scataglini
 
Modular android Project
Modular android ProjectModular android Project
Modular android ProjectRaka Mogandhi
 
WooCommerce CRUD and Data Store by Akeda Bagus
WooCommerce CRUD and Data Store by Akeda BagusWooCommerce CRUD and Data Store by Akeda Bagus
WooCommerce CRUD and Data Store by Akeda BagusWordCamp Indonesia
 
Ajava oep shopping application
Ajava oep shopping applicationAjava oep shopping application
Ajava oep shopping applicationPaneliya Prince
 
Evolve13 cq-commerce-framework
Evolve13 cq-commerce-frameworkEvolve13 cq-commerce-framework
Evolve13 cq-commerce-frameworkPaolo Mottadelli
 
Retail referencearchitecture productcatalog
Retail referencearchitecture productcatalogRetail referencearchitecture productcatalog
Retail referencearchitecture productcatalogMongoDB
 
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014Chad Windnagle
 
Tadhg Bowe - i18n: how can I rephrase that?
Tadhg Bowe - i18n: how can I rephrase that?Tadhg Bowe - i18n: how can I rephrase that?
Tadhg Bowe - i18n: how can I rephrase that?Mage Titans ES
 
Html5, a gentle introduction
Html5, a gentle introduction Html5, a gentle introduction
Html5, a gentle introduction Diego Scataglini
 
Ep2014 hypermedia APIs
Ep2014 hypermedia APIsEp2014 hypermedia APIs
Ep2014 hypermedia APIsadrianavasiu
 
Spca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_librariesSpca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_librariesNCCOMMS
 
Flamingo Commerce Module Details
Flamingo Commerce Module DetailsFlamingo Commerce Module Details
Flamingo Commerce Module Detailsi-love-flamingo
 

Similaire à Shopify Partner Social (20)

Magento Indexes
Magento IndexesMagento Indexes
Magento Indexes
 
Gail villanueva add muscle to your wordpress site
Gail villanueva   add muscle to your wordpress siteGail villanueva   add muscle to your wordpress site
Gail villanueva add muscle to your wordpress site
 
How to Create Module to Track Affiliate Conversions?
How to Create Module to Track Affiliate Conversions?How to Create Module to Track Affiliate Conversions?
How to Create Module to Track Affiliate Conversions?
 
Mobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLsMobile themes, QR codes, and shortURLs
Mobile themes, QR codes, and shortURLs
 
Progressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficadaProgressive Web Apps: o melhor da Web appficada
Progressive Web Apps: o melhor da Web appficada
 
APIs for catalogs
APIs for catalogsAPIs for catalogs
APIs for catalogs
 
Extending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHPExtending & Scaling | Dallas PHP
Extending & Scaling | Dallas PHP
 
Html 5, a gentle introduction
Html 5, a gentle introductionHtml 5, a gentle introduction
Html 5, a gentle introduction
 
Modular android Project
Modular android ProjectModular android Project
Modular android Project
 
WooCommerce CRUD and Data Store by Akeda Bagus
WooCommerce CRUD and Data Store by Akeda BagusWooCommerce CRUD and Data Store by Akeda Bagus
WooCommerce CRUD and Data Store by Akeda Bagus
 
Ajava oep shopping application
Ajava oep shopping applicationAjava oep shopping application
Ajava oep shopping application
 
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo MottadelliEVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
EVOLVE'13 | Enhance | Ecommerce Framework | Paolo Mottadelli
 
Evolve13 cq-commerce-framework
Evolve13 cq-commerce-frameworkEvolve13 cq-commerce-framework
Evolve13 cq-commerce-framework
 
Retail referencearchitecture productcatalog
Retail referencearchitecture productcatalogRetail referencearchitecture productcatalog
Retail referencearchitecture productcatalog
 
May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014May the core be with you - JandBeyond 2014
May the core be with you - JandBeyond 2014
 
Tadhg Bowe - i18n: how can I rephrase that?
Tadhg Bowe - i18n: how can I rephrase that?Tadhg Bowe - i18n: how can I rephrase that?
Tadhg Bowe - i18n: how can I rephrase that?
 
Html5, a gentle introduction
Html5, a gentle introduction Html5, a gentle introduction
Html5, a gentle introduction
 
Ep2014 hypermedia APIs
Ep2014 hypermedia APIsEp2014 hypermedia APIs
Ep2014 hypermedia APIs
 
Spca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_librariesSpca2014 hillier 3rd party_javascript_libraries
Spca2014 hillier 3rd party_javascript_libraries
 
Flamingo Commerce Module Details
Flamingo Commerce Module DetailsFlamingo Commerce Module Details
Flamingo Commerce Module Details
 

Dernier

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Dernier (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Shopify Partner Social

  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 10. What is a metafield and why should I care about them? Because saying they are awesome isn't often a good enough reason
  • 11. How can metafields help you? Maybe we'll talk a little about apps too
  • 12. Some healthy warnings on Metafields usage. Just because you can use them doesn't mean that you should
  • 13. What is a metafield and why should I care about them?
  • 14. https://help.shopify.com/themes/liquid/objects/metafield Let's start with the basics: The metafields object allows you to store additional information for products, collections, orders, articles, pages, customers and your shop. You can output metafields on your storefront using Liquid.
  • 15. Namespace + Key product.metafields.tabs.specs metafields: { tabs: { specs: 'value', photos: 'image1.jpg,image2.jpg' } } https://help.shopify.com/themes/liquid/objects/metafield
  • 16. {%- assign tabs = product.metafields.tabs -%} <ul class="tabs"> <li>{{ product.description }}</li> {%- for field in tabs -%} <li>{{ field | first }}: {{ field | last }}</li> {%- endfor -%} </ul> Basic code example. Product code would be prettier and check for valid metafield namespaces
  • 17. 1. Extends data fields, to complement or override 2. Avoids alternate templates to simplify theme files 3. Avoids abusing tags (remember the 1000 limit) 4. Avoids adding hacks in the description* 5. Maintains a pretty content structure 6. Keeps content hidden away** 7. They're awesome. * sometimes these hacks are a good thing ** not always a good thing
  • 18. How can metafields help you?
  • 19. Migrations. Other platforms may have custom fields that show on the storefront. Knowing you can map this data in the migration makes for an easier project win.
  • 20. Design touches like colour theming. Blue product has blue buttons, blue text. A metafield can store a hex code that's then used to output an inline style https://www.covetnation.com/products/occ-cosmetic-pencil-pool-boy
  • 21. {%- if product.metafields.style.colour != blank -%} {%- assign mColour = product.metafields.style.colour -%} <style> .add-to-cart { background: {{ mColour }} } </style> {%- endif -%} Grab the hex code, add some css
  • 22.
  • 23.
  • 24. Tabs and extra content. Basic extra content, in different places
  • 25. {%- assign tabs = product.metafields.tabs -%} <ul class="tabs"> {% include 'product-description' %} {%- for field in tabs -%} <li><h2>{{ field | first }}</h2>{{ field | last }}</li> {%- endfor -%} {% include 'related-products' %} </ul> Basic code example. Product code would be prettier and check for valid metafield namespaces
  • 26.
  • 27.
  • 28. Delivery timeframes, backorder dates, Units sold (with bar)... Knowing you can map this data in the migration makes for an easier project win.
  • 29. {% if backorder != blank %}<div>This item is backordered, and will ship in {{ backorder }}</div>{% endif %} <div class="stock-sold-bar"> <span data-start="{{ startCount }}" data-stock="{{ currentCount }}" data-percent="{{ soldPercent }}"></span> </div> http://freakdesign.com.au/blogs/news/17335317
  • 30.
  • 31.
  • 32. Dynamic layouts. Not as sexy as sections, but still super handy. Add lots of custom sections, and create a unique per product layout
  • 33.
  • 34. Customer personalisation. Use tags when you can, but metafields take things next level. Customer preferences FTW
  • 35.
  • 36. Inventory location. Multi-location inventory is coming. Until then Metafields can help... https://www.deadstock.ca/products/puma-tsugi-netfit-puma-black
  • 37. {%- assign locations = product.metafields.locations -%} {%- assign items = locations | split: ';' -%} <ul class="store-location"> {%- for item in items -%} {% assign stock = item | split:',' %} <li>{{ stock | first }}: {{ stock | last }}</li> {%- endfor -%} </ul> Simplified version, but you get the general idea.
  • 38.
  • 39. Related anything. Nested anything. Grouped anything Related products. Related collections. Nested collections. Products in articles.
  • 40. {%- assign r = product.metafields.related.items | split:"," -%} <div class="related-products"> {%- for p in r -%} {% assign relatedProduct = all_products[p] %} {%- include 'some-snippet' product: relatedProduct -%} {%- endfor -%} </div> This could be easier to read.
  • 41.
  • 42. {%- assign cParent = product.metafields.col.parent -%} {%- assign cChild = product.metafields.col.child -%} <div> {%- if collections[cChild].products.size > 0 -%} {%- include 'collection-loop' with collections[cChild] -%} {%- endif -%} </div> This could be easier to read.
  • 43. SEO control. Set custom canonical urls and meta tags with metafields. Related products. Related collections. Nested collections. Products in articles.
  • 44. Hide items from the sitemap. Related products. Related collections. Nested collections. Products in articles.
  • 45. To add noindex and nofollow meta tags to an object's pages, create a new metafield for the object with the following attributes: https://help.shopify.com/api/tutorials/updating-seo-data "namespace" : "seo" "key" : "hidden" "value" : 1 "value_type" : "integer"
  • 46. Cost of Goods. I see a few people asking for a way to store COGs. This can help.
  • 47.
  • 48. Best practice and healthy warnings on Metafields usage.
  • 49. Should the metafield even live in Shopify? Think smart about the data usage and how you're going to store it. Many things would be better in their own offsite database. Others in built in options.
  • 50. Not well supported in the Admin. You must rely on apps and third party tools. Only the bulk product editor has the ability to edit metafields https://www.shopify.com/partners/blog/53573123-secrets-of-the-shopify-bulk-editor
  • 51. Metafields are not returned in Admin or Storefront search. Storefront can be helped with apps, or AJAX search methods (if the SKU count is small)
  • 52. API call limits are a real thing. Are you considering that in your dev flow? How many metafields are you saving? How many per object? How often will you update? 100 values in 1 metafield faster than 100 individual metafields
  • 53. Metafields don't work in Shopify Scripts. How many metafields are you saving? How many per object? How often will you update?
  • 55. Document your usage for the merchant and fellow dev in the theme. Nothing worse than digging through some complex theme to find there's a pile of custom content being pulled in from a metafield.
  • 56. More 1. Shopify Bulk Editor (built in metafield editing) 2. Shopify Apps (search for metafields) 3. Extensions like ShopifyFD or Custom Fields 4. xporter app 5. https://help.shopify.com/themes/liquid/objects/metafield 6. https://help.shopify.com/api/reference/metafield 7. https://www.shopify.com/partners/blog/110057030-using-metafiel ds-in-your-shopify-theme
  • 60.
  • 62. augment user experience capture necessary information consistent brand experience interfering/replacing user experience capturing unnecessary information changing the flow
  • 66.
  • 69. driven by javascript {%- capture HTML_AUTOCOMPLETE_RESULTS_MESSAGE -%}
 <li class="ui-menu-item ui-menu-item--message">
 <span>
 <span class="ui-menu-item--message__action" data-act=“show-address">{{ 'shopify.checkout.custom.error' | t }}</span>
 {{ 'shopify.checkout.custom.autocomplete_results_message' | t }}
 </span>
 </li>
 {%- endcapture -%}
  • 70. <!-- Initialise custom checkout. -->
 <script type="text/javascript">
 (function(YoufoodzCheckout, $, Shopify) {
 
 // Define options that will be passed to each module on initialization.
 var options = {
 TEMPLATES: {
 HTML_DISABLED_DISCOUNTS_MESSAGE: {{ HTML_DISABLED_DISCOUNTS_MESSAGE | json }},
 HTML_DELIVERY_ADDRESS_SUBTITLE: {{ HTML_DELIVERY_ADDRESS_SUBTITLE | json }},
 HTML_KNOWN_SUBURB_PROMPT: {{ HTML_KNOWN_SUBURB_PROMPT | json }}, driven by javascript
  • 71. page event pattern + modules
  • 72. page event pattern + modules $(document).on('page:load page:change', function() {
 $.each(YoufoodzCheckout.modules || [], function(index, module) {
 if(module.steps.indexOf(Shopify.Checkout.step) !== -1) {
 // If on the shipping method page and rates haven't yet returned, do
 // nothing.
 if(Shopify.Checkout.step === 'shipping_method' && $('[data-poll-refresh]').length) {
 return;
 }
 
 // Otherwise, initialise the module.
 initializeModule(module, options);
 }
 });
 });
  • 76. Why Use Advanced Search? ✓ Faster ✓ More Relevant ✓ Better Merchandising ✓ Analytics ✓ Faster, Higher Conversions ✓ Better UX
  • 77. Autocomplete • Provide value in results • Remove clutter • Obsess about relevance • Refine synonyms • Analyse data • Modify results
  • 78. Filters • Use existing data, if possible • Survey customers about how they refine searches • Set realistic min max boundaries • Test for speed • Customise sort order on a per- result set basis • Boost the results you want • Push down the results you don’t • Decide between OR / AND • Allow easy toggling of selections • Make good use of UI elements
  • 79. Information / Guides • Separate results in different categories within the same collection • Index informational results alongside shopping results
  • 80. Results Picker • Guide by selection for people who need prompting • Think like your customers • Provide quick, contextual updates • Show counts with selects
  • 81. Autocomplete Suggestions • Suggest common terms • Customise layout elements for your audience
  • 82. Advanced Filtering • Consider your audience • Show relevant data in results • Contextual searches with dropdowns • Advanced filtering based on category
  • 83. Cheap & Easy Autocomplete • Algolia app
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99. Q&A
  • 100.
  • 101.
  • 102.