Skip to content

Instantly share code, notes, and snippets.

{
"name": "t:sections.header.name",
"type": "header",
"sections": {
"announcement-bar": {
"type": "announcement-bar",
"blocks": {
"announcement-bar-0": {
"type": "announcement",
"settings": {
└─ theme
├─ assets
├─ config
├─ layout
│ └─ theme.liquid
├─ locales
└─ sections
├─ footer-group.json
├─ header.liquid
├─ header-group.json
@shopifypartners
shopifypartners / videos.liquid
Created January 4, 2023 14:30
Example of a Shopify theme section that displays both externally hosted videos and videos uploaded via the store admin
<div class='video-section'>
<h2>{{ section.settings.heading }}</h2>
{% for block in section.blocks %}
{% case block.type %}
{% when 'video-stored' %}
<div class="stored-video" {{ block.shopify_attributes }}>
{{ block.settings.video | media_tag }}
</div>
{% when 'external-video' %}
<div class ="external-video"{{ block.shopify_attributes }}>
@shopifypartners
shopifypartners / video-by-upload.liquid
Created January 4, 2023 14:28
Example of a Shopify theme section displaying a video uploaded via the store admin
<div class="video-section">
<h2>{{ section.settings.heading }}</h2>
{{ section.settings.video | video_tag }}
</div>
{% schema %}
{
"name": "Video",
"settings": [
{
@shopifypartners
shopifypartners / external-video.liquid
Last active February 16, 2023 11:24
Example of a Shopify theme section displaying an externally hosted video
<div class="video-section">
<h2>{{ section.settings.heading }}</h2>
{%- if section.settings.video_url.type == 'youtube' -%}
<iframe src="https://www.youtube.com/embed/{{ section.settings.video_url.id }}" class="youtube" allow="autoplay; encrypted-media" title="{{ section.settings.description | escape }}"></iframe>
{%- else -%}
<iframe src="https://player.vimeo.com/video/{{ section.settings.video_url.id }}" class="vimeo" allow="autoplay; encrypted-media" title="{{ section.settings.description | escape }}"></iframe>
{%- endif -%}
</div>
{% schema %}
@shopifypartners
shopifypartners / backup_rate_example.yml
Created October 25, 2022 17:14 — forked from krzysztofbialek/backup_rate_example.yml
Backup rates example for Shipping Applications development good practices
rate_definitions:
-
name: Standard
price: 0
currency: CAD
rate_class_id: 10
conditions:
-
field: total_price
criteria: 100
@shopifypartners
shopifypartners / curl_result_example.txt
Created October 25, 2022 17:14 — forked from krzysztofbialek/curl_result_example.txt
Latency curl result example for Shipping Applications development good practices
time_namelookup: 0.326604s
time_connect: 0.467748s
time_appconnect: 0.000000s
time_pretransfer: 0.467986s
time_redirect: 0.000000s
time_starttransfer: 0.584812s
----------
time_total: 0.584852s