Convert a single video to web-optimized MP4:
ffmpeg -i input.mov -vf "scale=-2:1080:flags=lanczos" -c:v libx264 -crf 23 -preset slow -c:a aac -b:a 128k -movflags +faststart output_web.mp4Important: You'll need to replace YOUR_METAOBJECT_DEFINITION_ID with the actual ID of the "Press reviews" metaobject definition from the target store. After you create the metaobject definition using the first mutation I provided, you'll get back an ID that you can use here in the validation value.
This metafield allows you to attach a list of press review metaobjects to your products, making it accessible from both the admin and your storefront.
Or, you can look up the ID with this GraphQL query:
query GetPressReviewsMetaobjectDefinitionId {
metaobjectDefinitionByType(type: "press_reviews") {
id| query { | |
| products(first: 10, query: "(id:1234567890) OR (id:0987654321)") { | |
| edges { | |
| node { | |
| title | |
| id | |
| } | |
| } | |
| } | |
| } |
| query { | |
| productByHandle(handle: "protein-juice-cleanse") { | |
| id | |
| title | |
| requiresSellingPlan | |
| sellingPlanGroups(first:1) { | |
| edges { | |
| node { | |
| sellingPlans(first: 6) { | |
| edges { |
| query productCollection($handle: String!, $firstProducts: Int!, $metafield: String!) { | |
| collectionByHandle(handle: $handle) { | |
| id | |
| title | |
| productsCount { | |
| count | |
| } | |
| products(first: $firstProducts) { | |
| edges { | |
| node { |
| {% comment %} | |
| Shopify Placeholder SVGs | |
| Outputs every Shopify placeholder_svg_tag available. A simple reference to use during theme development. | |
| https://shopify.dev/docs/api/liquid/filters/placeholder_svg_tag | |
| {% endcomment %} | |
| {%- liquid | |
| assign outline_illustrations = 'product-1,product-2,product-3,product-4,product-5,product-6,collection-1,collection-2,collection-3,collection-4,collection-5,collection-6,lifestyle-1,lifestyle-2,image' | |
| assign color_illustrations = 'product-apparel-1,product-apparel-2,product-apparel-3,product-apparel-4,collection-apparel-1,collection-apparel-2,collection-apparel-3,collection-apparel-4,hero-apparel-1,hero-apparel-2,hero-apparel-3,blog-apparel-1,blog-apparel-2,blog-apparel-3,detailed-apparel-1' |
| """ | |
| Metafields: | |
| - reviewscouk.single_line_text_field | |
| - reviewscouk.number_integer | |
| - reviewscouk.static_product_widget | |
| """ | |
| { | |
| productByHandle(handle: "your-product-handle") { | |
| title |
| import { json } from "@remix-run/node"; | |
| import { | |
| Page, | |
| Layout, | |
| Text, | |
| BlockStack, | |
| ResourceList, | |
| ResourceItem, | |
| Thumbnail, | |
| Badge, |
| import { json } from "@remix-run/node"; | |
| import { Page, Layout, BlockStack } from "@shopify/polaris"; | |
| import { authenticate } from "../shopify.server"; | |
| import { useLoaderData } from "@remix-run/react"; | |
| export const loader = async ({ request, params }) => { | |
| const handle = params.handle; | |
| const { admin } = await authenticate.admin(request); | |
| const response = await admin.graphql( |
| <!DOCTYPE html> | |
| <html lang="{{ locale }}" dir="{{ direction }}" class="{{ checkout_html_classes }}"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, height=device-height, minimum-scale=1.0, user-scalable=0"> | |
| <meta name="referrer" content="origin"> | |
| <title>{{ page_title }}</title> |