product-video-reviews

{%- comment -%} Video Reviews carousel — House of Gadgets Each block = one video. Use EITHER an uploaded video OR a link (YouTube / Shorts / Instagram Reel / TikTok / Facebook). {%- endcomment -%} {%- liquid assign card_count = 0 assign card_w = section.settings.card_width assign radius = section.settings.radius -%} {%- capture cards -%} {%- for block in section.blocks -%} {%- liquid assign v = block.settings.video assign link = block.settings.video_link if v == blank and link == blank continue endif if block.settings.only_this_product and block.settings.product != blank if product == blank continue endif if product.id != block.settings.product.id continue endif endif assign card_count = card_count | plus: 1 if v != blank assign kind = 'upload' assign platform = 'Video' else assign kind = 'link' assign platform = 'Video' if link contains 'youtu' assign platform = 'YouTube' elsif link contains 'instagram' assign platform = 'Instagram' elsif link contains 'tiktok' assign platform = 'TikTok' elsif link contains 'facebook' or link contains 'fb.watch' assign platform = 'Facebook' endif endif assign label = block.settings.name | default: 'Customer review' assign p = block.settings.product -%}
{%- if kind == 'upload' -%} {%- endif -%} {%- if p != blank -%} {%- endif -%}
{%- endfor -%} {%- endcapture -%} {%- if card_count > 0 or request.design_mode -%}
{%- if section.settings.heading != blank or section.settings.subheading != blank -%}
{%- if section.settings.heading != blank -%}

{{ section.settings.heading | escape }}

{%- endif -%} {%- if section.settings.subheading != blank -%}

{{ section.settings.subheading | escape }}

{%- endif -%}
{%- endif -%} {%- if card_count == 0 -%}

Add a video block: upload a video or paste a YouTube / Instagram / TikTok / Facebook link.

{%- else -%}
{{ cards }}
{%- endif -%}
{%- endif -%} {% schema %} { "name": "Video reviews", "tag": "div", "class": "section-video-reviews", "settings": [ { "type": "text", "id": "heading", "label": "Heading", "default": "Customer Video Reviews" }, { "type": "text", "id": "subheading", "label": "Subheading", "default": "Real customers, real unboxings — see it before you buy." }, { "type": "range", "id": "card_width", "label": "Card width (desktop)", "min": 160, "max": 320, "step": 10, "unit": "px", "default": 210 }, { "type": "range", "id": "radius", "label": "Corner radius", "min": 0, "max": 24, "step": 2, "unit": "px", "default": 4 }, { "type": "checkbox", "id": "show_text", "label": "Show customer name & caption on cards", "default": true }, { "type": "checkbox", "id": "autoplay_preview", "label": "Autoplay uploaded videos as silent previews", "info": "Looks lively but uses more mobile data. Leave off for faster pages.", "default": false }, { "type": "range", "id": "padding_top", "label": "Top spacing", "min": 0, "max": 100, "step": 4, "unit": "px", "default": 40 }, { "type": "range", "id": "padding_bottom", "label": "Bottom spacing", "min": 0, "max": 100, "step": 4, "unit": "px", "default": 40 } ], "blocks": [ { "type": "video", "name": "Video", "settings": [ { "type": "video", "id": "video", "label": "Upload video", "info": "Vertical (9:16) MP4 works best. If you upload a video, the link below is ignored." }, { "type": "url", "id": "video_link", "label": "…or paste a video link", "info": "YouTube, YouTube Shorts, Instagram Reel, TikTok or Facebook video URL." }, { "type": "image_picker", "id": "thumbnail", "label": "Cover image (optional)", "info": "Automatic for uploads and YouTube. Recommended for Instagram, TikTok and Facebook links." }, { "type": "text", "id": "name", "label": "Customer name" }, { "type": "text", "id": "caption", "label": "Short caption" }, { "type": "product", "id": "product", "label": "Product shown in video", "info": "Adds a 'Shop now' bar under the video when it opens." }, { "type": "checkbox", "id": "only_this_product", "label": "Show only on that product's page", "info": "Leave off to show this video on every product page.", "default": false } ] } ], "presets": [ { "name": "Video reviews", "blocks": [{ "type": "video" }, { "type": "video" }, { "type": "video" }] } ] } {% endschema %}