### Selling Plan Option Example Source: https://shopify.dev/docs/api/liquid/objects/selling_plan_option This snippet shows an example of the selling_plan_option object structure. ```json { "name": "Delivery frequency", "position": 1, "value": "Deliver every week" } ``` -------------------------------- ### Color Scheme Object Example Source: https://shopify.dev/docs/api/liquid/objects/color_scheme This is an example of the color_scheme object structure, showing its ID and settings. ```json { "id": "background-2", "settings": {} } ``` -------------------------------- ### Product URL Example Source: https://shopify.dev/docs/api/liquid/objects/product_option_value This example demonstrates how to retrieve the product URL associated with a product option value, if one exists. ```liquid {{ product_option_value.product_url }} ``` -------------------------------- ### Discount Application Example Source: https://shopify.dev/docs/api/liquid/objects/discount_application This snippet shows a complete example of the discount_application object, illustrating its structure and the types of values it can hold for various discount properties. ```json { "target_selection": "explicit", "target_type": "line_item", "title": "Bloodroot discount!", "total_allocated_amount": "2.50", "type": "script", "value": "2.5", "value_type": "fixed_amount" } ``` -------------------------------- ### Discount Allocation Example Source: https://shopify.dev/docs/api/liquid/objects/discount_allocation This snippet shows an example of the discount_allocation object's structure, including the amount and discount application type. ```json { "amount": "40.00", "discount_application": "DiscountApplicationDrop" } ``` -------------------------------- ### Product Recommendations Object Example Source: https://shopify.dev/docs/api/liquid/objects/recommendations This example shows the structure of the 'recommendations' object when product recommendations are successfully performed. It includes an array of recommended products, the count of these products, and a boolean indicating if the recommendations were performed. ```json { "products": [], "products_count": 4, "performed?": true } ``` -------------------------------- ### Output of Liquid Tag Example Source: https://shopify.dev/docs/api/liquid/tags/liquid Displays the rendered output of the Liquid tag example when the product type is 'health'. ```text This is a health potion! ``` -------------------------------- ### Sitemap Directive Example Source: https://shopify.dev/docs/api/liquid/objects/sitemap This is an example of the Sitemap directive as it would appear in a robots.txt file, pointing to the sitemap's URL. ```robots.txt Sitemap: https://your-store.myshopify.com/sitemap.xml ``` -------------------------------- ### Combined Echo Tag Examples Source: https://shopify.dev/docs/api/liquid/tags/echo A consolidated example showing both basic product title output and formatted price output using the echo tag within a liquid block. ```liquid {% echo product.title %} {% liquid echo product.price | money %} ``` -------------------------------- ### Selling Plan Object Example Source: https://shopify.dev/docs/api/liquid/objects/selling_plan This snippet shows an example of the selling_plan object structure, including its various properties and their typical values. It's useful for understanding the data returned when querying selling plan information. ```json { "checkout_charge": {}, "description": null, "group_id": "e88ff8fdb3c39c89b564859e34542e0b982076d6", "id": 2595487809, "name": "Deliver every week, 10% off", "options": [], "price_adjustments": [], "recurring_deliveries": true, "selected": true } ``` -------------------------------- ### Gift Card Object Example Source: https://shopify.dev/docs/api/liquid/objects/gift_card This example shows the structure of a Gift Card object with various properties. ```json { "balance": 5000, "code": "WCGX 7X97 K9HJ DFR8", "currency": "CAD", "customer": {}, "enabled": true, "expired": false, "expires_on": null, "initial_value": 5000, "last_four_characters": "DFR8", "message": null, "send_on": null, "pass_url": "https://polinas-potent-potions.myshopify.com/v1/passes/pass.com.shopify.giftcardnext/94af7fbe55d010130df8d8bc4a338d36/", "product": {}, "variant": {}, "properties": {}, "qr_identifier": "shopify-giftcard-v1-3TKWJKJBM3X7PBRK", "recipient": null, "template_suffix": null } ``` -------------------------------- ### Product Option Value Example Source: https://shopify.dev/docs/api/liquid/objects/product_option_value This snippet shows an example of a product option value object, including its properties like availability, ID, name, selection status, and swatch/variant details. ```json { "available": true, "id": 2070385033281, "name": "Bronze", "product_url": null, "selected": true, "swatch": {}, "variant": {} } ``` -------------------------------- ### Part Object Example Source: https://shopify.dev/docs/api/liquid/objects/part Demonstrates the structure of a 'part' object used in pagination. ```json { "is_link": true, "title": "2", "url": "/collections/all?page=2" } ``` -------------------------------- ### Video Object Example Source: https://shopify.dev/docs/api/liquid/objects/video This is an example of the video object's structure, showing its properties and their data types. It includes alt text, aspect ratio, duration, ID, media type, position, preview image, and sources. ```json { "alt": "Potion beats", "aspect_ratio": 1.779, "duration": 34801, "id": 22070396551233, "media_type": "video", "position": 2, "preview_image": {}, "sources": [] } ``` -------------------------------- ### Output of the Raw Tag Example Source: https://shopify.dev/docs/api/liquid/tags/raw This shows the literal output produced by the 'raw' tag example. The Liquid expression is not evaluated and is displayed as is. ```text {{ 2 | plus: 2 }} equals 4. ``` -------------------------------- ### Theme Object Example Source: https://shopify.dev/docs/api/liquid/objects/theme This example shows the structure of the theme object, including its ID, name, and role. Note that this object is deprecated in Liquid. ```JSON { "id": 124051750977, "name": "Dawn", "role": "main" } ``` -------------------------------- ### Disallow Rule Example Source: https://shopify.dev/docs/api/liquid/objects/rule An example of a Disallow rule for the robots.txt file, blocking access to a specific URL path. ```text Disallow: /policies/ ``` -------------------------------- ### Pagination Output Example Source: https://shopify.dev/docs/api/liquid/objects/part Shows the rendered HTML output for a pagination navigation, including links and the current page indicator. ```html 1 2 3 4 ``` -------------------------------- ### Block Object Properties Example Source: https://shopify.dev/docs/api/liquid/objects/block This example shows the structure of a block object, including its ID, settings, Shopify attributes, and type. The 'shopify_attributes' are used by the theme editor. ```json { "id": "column1", "settings": "array", "shopify_attributes": "data-shopify-editor-block=\"{\"id\":\"column1\",\"type\":\"column\"}"", "type": "column" } ``` -------------------------------- ### Location Object Example Source: https://shopify.dev/docs/api/liquid/objects/location This example shows the structure of the 'location' object, which is defined when local pickup is enabled for a store. It includes details about the address, ID, coordinates, and name. ```json { "address": {}, "id": 62002462785, "latitude": 43.6556377, "longitude": -79.38681079999999, "metafields": {}, "name": "123 Edward Street" } ``` -------------------------------- ### Selling Plan Price Adjustment Example Source: https://shopify.dev/docs/api/liquid/objects/selling_plan_price_adjustment This snippet shows an example of a selling plan price adjustment object. It specifies a 10% price adjustment that applies indefinitely (order_count is null). ```json { "order_count": null, "position": 1, "value": 10, "value_type": "percentage" } ``` -------------------------------- ### Quantity Rule JSON Example Source: https://shopify.dev/docs/api/liquid/objects/quantity_rule This snippet shows an example of how a quantity rule can be structured in JSON format, specifying minimum, maximum, and increment values. ```json { "min": 5, "max": 100, "increment": 5 } ``` -------------------------------- ### Customer Login Form Example Source: https://shopify.dev/docs/api/liquid/tags/form Generates a form for logging into a customer account. This is used in the `customers/login` template. ```liquid {% form 'customer_login' %} {% endform %} ``` ```html
``` -------------------------------- ### JSON Output Example Source: https://shopify.dev/docs/api/liquid/filters/json This is an example of the JSON output generated by the `json` filter when applied to a product object. Note that inventory quantities are excluded for security. ```json {"id":6792602320961,"title":"Crocodile tears","handle":"crocodile-tears","description":"","published_at":"2022-04-22T11:55:58-04:00","created_at":"2022-04-22T11:55:56-04:00","vendor":"Polina's Potent Potions","type":"","tags":["Salty"],"price":5600,"price_min":5600,"price_max":5600,"available":false,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":39888242344001,"title":"Default Title","option1":"Default Title","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":true,"featured_image":null,"available":false,"name":"Crocodile tears","public_title":null,"options":["Default Title"],"price":5600,"weight":0,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/polinas-potent-potions.myshopify.com\/cdn\/shop\/products\/amber-beard-oil-bottle.jpg?v=1650642958"],"featured_image":"\/\/polinas-potent-potions.myshopify.com\/cdn\/shop\/products\/amber-beard-oil-bottle.jpg?v=1650642958","options":["Title"],"media":[{"alt":null,"id":21772501975105,"position":1,"preview_image":{"aspect_ratio":1.5,"height":2974,"width":4460,"src":"\/\/polinas-potent-potions.myshopify.com\/cdn\/shop\/products\/amber-beard-oil-bottle.jpg?v=1650642958"},"aspect_ratio":1.5,"height":2974,"media_type":"image","src":"\/\/polinas-potent-potions.myshopify.com\/cdn\/shop\/products\/amber-beard-oil-bottle.jpg?v=1650642958","width":4460}],"requires_selling_plan":false,"selling_plan_groups":[],"content":""} ``` -------------------------------- ### Quantity Price Break Example Source: https://shopify.dev/docs/api/liquid/objects/quantity_price_break This JSON object shows an example of the quantity_price_break structure, indicating that a minimum of 10 units are required to receive a price of 20.00. ```json { "minimum_quantity": "10", "price": "20.00" } ``` -------------------------------- ### Selling Plan Group Example Source: https://shopify.dev/docs/api/liquid/objects/selling_plan_group This snippet shows an example of the selling_plan_group object structure, including its properties and their typical values. It's useful for understanding the data format when working with selling plans in Shopify Liquid. ```json { "app_id": "gid://shopify/App/66228322305", "id": "e88ff8fdb3c39c89b564859e34542e0b982076d6", "name": "1 Week(s), 4 Week(s)", "options": [], "selling_plan_selected": false, "selling_plans": [] } ``` -------------------------------- ### Volume Measurement Example Source: https://shopify.dev/docs/api/liquid/objects/measurement This snippet shows an example of a volume measurement object. It specifies the type as 'volume', the unit as 'mL', and the value as '500.0'. Use this structure when working with volume-related metafields. ```json { "type": "volume", "unit": "mL", "value": "500.0" } ``` -------------------------------- ### Example Output of Product Title Source: https://shopify.dev/docs/api/liquid/objects/all_products This shows the expected output when the Liquid code to access a product's title is rendered. ```text Love Potion ``` -------------------------------- ### Liquid Tag Syntax Example Source: https://shopify.dev/docs/api/liquid/tags/liquid Demonstrates the basic syntax of the Liquid tag, which encloses an expression to be rendered. ```liquid {% liquid expression %} ``` -------------------------------- ### Discount Object Example Source: https://shopify.dev/docs/api/liquid/objects/discount This snippet shows an example of the Discount object's structure and its properties, including amount, code, savings, title, total_amount, total_savings, and type. It is useful for understanding the data format returned for discounts. ```json { "amount": "40.00", "code": "DIY", "savings": "-40.00", "title": "DIY", "total_amount": "40.00", "total_savings": "-40.00", "type": "PercentageDiscount" } ``` -------------------------------- ### Capitalize filter output example Source: https://shopify.dev/docs/api/liquid/filters/capitalize Shows the expected output after applying the capitalize filter to a sample string. ```Text This sentence should start with a capitalized word. ``` -------------------------------- ### Example Output for Paginated Page Source: https://shopify.dev/docs/api/liquid/objects/current_page This shows the expected output when the current page is 2 and the page title is 'Ingredients'. ```liquid Ingredients - Page 2 ``` -------------------------------- ### Swatch Object Example Source: https://shopify.dev/docs/api/liquid/objects/swatch This snippet shows the basic structure of a swatch object, which can contain color or image properties. ```json { "color": {}, "image": {} } ``` -------------------------------- ### Example Output of url_for_vendor Source: https://shopify.dev/docs/api/liquid/filters/url_for_vendor This is the expected URL output when using the url_for_vendor filter with a vendor name. ```text /collections/vendors?q=Polina%27s%20Potent%20Potions ``` -------------------------------- ### Product Data Example Source: https://shopify.dev/docs/api/liquid/filters/default_pagination This JSON structure represents a collection of products, including their titles and the total count. ```json { "collection": { "products": [ { "title": "Draught of Immortality" }, { "title": "Glacier ice" } ], "products_count": 4 } } ``` -------------------------------- ### Include option_selection.js Source: https://shopify.dev/docs/api/liquid/filters/shopify_asset_url Use the shopify_asset_url filter to get the CDN path for the 'option_selection.js' asset. ```liquid {{ 'option_selection.js' | shopify_asset_url }} ``` -------------------------------- ### Example script tag output Source: https://shopify.dev/docs/api/liquid/filters/script_tag This is an example of the HTML output generated by the script_tag filter. ```html ``` -------------------------------- ### Using handleize and handle filters Source: https://shopify.dev/docs/api/liquid/filters/handleize Demonstrates how to use the 'handleize' filter and its alias 'handle' to convert a product title into a handle. Both filters produce the same output. ```Liquid {{ product.title | handleize }} {{ product.title | handle }} ``` -------------------------------- ### Example output of file_url filter Source: https://shopify.dev/docs/api/liquid/filters/file_url This is an example of the URL returned by the file_url filter for a given file. ```plaintext //polinas-potent-potions.myshopify.com/cdn/shop/files/disclaimer.pdf?v=9043651738044769859 ``` -------------------------------- ### Example Metafield Data Structure Source: https://shopify.dev/docs/api/liquid/filters/metafield-filters Shows the JSON structure for product metafields. This is useful for understanding how metafield data is organized. ```JSON { "product": { "metafields": {} } } ``` -------------------------------- ### Recipient Object Example Source: https://shopify.dev/docs/api/liquid/objects/recipient This is an example of the recipient object structure. It includes the email, name, and nickname of the recipient. ```json { "email": "cornelius.potionmaker@gmail.com", "name": "Cornelius Potionmaker", "nickname": "Cornelius" } ``` -------------------------------- ### Product URL with Recommendation Tracking Parameters Source: https://shopify.dev/docs/api/liquid/objects/product This example shows the relative URL of a product when it's rendered as a product recommendation. The URL includes tracking parameters for personalization and analytics. ```liquid /products/gorgeous-wooden-computer?pr_choice=default&pr_prod_strat=description&pr_rec_pid=13&pr_ref_pid=17&pr_seq=alternating ``` -------------------------------- ### Output of specifying image format Source: https://shopify.dev/docs/api/liquid/filters/image_url This example shows the resulting image URL after applying the 'format' parameter to convert the image to pJPG. ```Liquid //polinas-potent-potions.myshopify.com/cdn/shop/files/science-beakers-blue-light-new.jpg?format=pjpg&v=1683744744&width=450 ``` -------------------------------- ### Example Data for Liquid Tag Source: https://shopify.dev/docs/api/liquid/tags/liquid Provides the JSON data structure used in the Liquid tag example to define product types for conditional rendering. ```json { "product": { "type": null } } ``` -------------------------------- ### Image URL with different crop parameters Source: https://shopify.dev/docs/api/liquid/filters/image_url Demonstrates various cropping methods for an image URL. These examples show how to use 'crop=bottom' and 'crop=region' with different dimension specifications. ```Liquid //polinas-potent-potions.myshopify.com/cdn/shop/files/science-beakers-blue-light-new.jpg?crop=bottom&height=400&v=1683744744&width=400 ``` ```Liquid //polinas-potent-potions.myshopify.com/cdn/shop/files/science-beakers-blue-light-new.jpg?crop=region&crop_height=512&crop_left=32&crop_top=32&crop_width=512&v=1683744744 ``` ```Liquid //polinas-potent-potions.myshopify.com/cdn/shop/files/science-beakers-blue-light-new.jpg?crop=region&crop_height=512&crop_left=32&crop_top=32&crop_width=512&height=100&v=1683744744&width=100 ``` -------------------------------- ### Output of specifying padding color Source: https://shopify.dev/docs/api/liquid/filters/image_url This example shows the resulting image URL after applying the 'pad_color' parameter to pad the image with black. ```Liquid //polinas-potent-potions.myshopify.com/cdn/shop/files/science-beakers-blue-light-new.jpg?height=400&pad_color=000&v=1683744744&width=400 ``` -------------------------------- ### Customer Data Example Source: https://shopify.dev/docs/api/liquid/objects/customer This JSON snippet shows a simplified customer object with a first name, used for demonstrating Liquid template output. ```json { "customer": { "first_name": "Cornelius" } } ``` -------------------------------- ### Shop Policies Example Source: https://shopify.dev/docs/api/liquid/objects/shop This snippet shows how to access different shop policies like refund, privacy, terms of service, and shipping policies. It's useful for displaying policy information to customers. ```liquid {% for policy in shop.policies %} {{ policy }} {% endfor %} ``` -------------------------------- ### Transaction Object Example Source: https://shopify.dev/docs/api/liquid/objects/transaction This is an example of the transaction object's structure and its properties. It shows typical values for amount, creation timestamp, gateway, and payment details. ```json { "amount": "380.25", "created_at": "2022-06-15 19:13:14 -0400", "gateway": "shopify_payments", "gateway_display_name": "Shopify payments", "id": 5432242176065, "kind": "sale", "name": "c29944051400769.", "payment_details": { "credit_card_number": "•••• •••• •••• 4242", "credit_card_company": "Visa", "credit_card_last_four_digits": "4242", "receiver_info": null } } ``` -------------------------------- ### Example Access for Cart Calculate Line Items Script Source: https://shopify.dev/docs/api/liquid/objects/scripts This JSON snippet demonstrates how the cart_calculate_line_items script might be accessed or represented in an example data structure. ```json { "cart_calculate_line_items": {} } ``` -------------------------------- ### Predictive Search API Response Example Source: https://shopify.dev/docs/api/liquid/objects/predictive_search This is an example JSON structure of the response from the Predictive Search API. It includes fields for 'performed', 'resources', 'terms', and 'types'. ```json { "performed": true, "resources": {}, "terms": "potion", "types": [] } ``` -------------------------------- ### Get Product Featured Image URL Source: https://shopify.dev/docs/api/liquid/filters/product_img_url Use this snippet to get the CDN URL for a product's featured image. This filter is deprecated and has been replaced by `image_url`. ```liquid {{ product.featured_image | product_img_url }} ``` -------------------------------- ### Example Setting Data Source: https://shopify.dev/docs/api/liquid/objects/settings This JSON represents the data structure for a setting, showing a 'favicon' key with a null value, indicating it's not currently set. ```json { "settings": { "favicon": null } } ``` -------------------------------- ### Get Article Image URL Source: https://shopify.dev/docs/api/liquid/filters/article_img_url Use this snippet to get the default small CDN URL for an article's image. This filter is deprecated and has been replaced by `image_url`. ```Liquid {{ article.image | article_img_url }} ``` -------------------------------- ### Basic Echo Tag Usage Source: https://shopify.dev/docs/api/liquid/tags/echo Demonstrates the basic syntax of the echo tag to output a product's title. This is equivalent to {{ product.title }}. ```liquid {% echo product.title %} ``` -------------------------------- ### Basic `doc` Tag Usage Source: https://shopify.dev/docs/api/liquid/tags/doc Demonstrates the basic structure of the `doc` tag, including a description, parameter annotations, and an example of how to render a component. ```liquid {% doc %} Renders a message. @param {string} foo - A string value. @param {string} [bar] - An optional string value. @example {% render 'message', foo: 'Hello', bar: 'World' %} {% enddoc %} ``` -------------------------------- ### Store Availability Example Source: https://shopify.dev/docs/api/liquid/objects/store_availability This snippet shows the structure of the store_availability object, including whether a variant is available, details about the location, pickup enablement, and the estimated pickup time. ```json { "available": true, "location": {}, "pick_up_enabled": true, "pick_up_time": "Usually ready in 24 hours" } ``` -------------------------------- ### Example JSON structure for color schemes Source: https://shopify.dev/docs/api/liquid/objects/color_scheme_group Illustrates the expected JSON structure for color scheme settings, including an object for color schemes which can contain individual scheme configurations. ```json { "settings": { "color_schemes": {} } } ``` -------------------------------- ### Get font URL in woff2 format Source: https://shopify.dev/docs/api/liquid/filters/font_url Use this snippet to get the default CDN URL for a font in woff2 format. Ensure the font object is correctly assigned to settings.type_header_font. ```liquid {{ settings.type_header_font | font_url }} ``` ```json { "settings": { "type_header_font": {} } } ``` ```text //polinas-potent-potions.myshopify.com/cdn/fonts/assistant/assistant_n4.9120912a469cad1cc292572851508ca49d12e768.woff2 ``` -------------------------------- ### Example Data for Cart Calculate Line Items Script Source: https://shopify.dev/docs/api/liquid/objects/scripts This JSON structure represents the data available for the cart_calculate_line_items script when it is active. It shows an example of how the script name might be formatted. ```json { "scripts": { "cart_calculate_line_items": { "name": "10% off Whole bloodroot" } } } ``` -------------------------------- ### Get Collection Image URL (Specified Size) Source: https://shopify.dev/docs/api/liquid/filters/collection_img_url Use this snippet to get a CDN URL for a collection's image with a specified size, such as 'large'. This filter is deprecated and has been replaced by `image_url`. ```Liquid {{ collection.image | collection_img_url: 'large' }} ``` -------------------------------- ### Accessing Variant Quantity Rule in Liquid Source: https://shopify.dev/docs/api/liquid/objects/quantity_rule Demonstrates how to access the quantity rule for the first variant of a product using Liquid templating. ```liquid {{ product.variants.first.quantity_rule }} ``` -------------------------------- ### Get Collection Image URL (Default Size) Source: https://shopify.dev/docs/api/liquid/filters/collection_img_url Use this snippet to get the default small (100x100px) CDN URL for a collection's image. This filter is deprecated and has been replaced by `image_url`. ```Liquid {{ collection.image | collection_img_url }} ``` -------------------------------- ### Guest Login Form Example Source: https://shopify.dev/docs/api/liquid/tags/form Generates a form for guest checkout, directing customers back to their checkout session as a guest. This form is used within the `customers/login` template. ```liquid {% form 'guest_login' %} {% endform %} ``` ```html ``` -------------------------------- ### Slice String and Array with Positive Index Source: https://shopify.dev/docs/api/liquid/filters/slice Extracts a substring starting from index 0, and then a substring of length 5. Also extracts two items from an array starting at index 1. ```liquid {{ collection.title | slice: 0 }} {{ collection.title | slice: 0, 5 }} {{ collection.all_tags | slice: 1, 2 | join: ', ' }} ``` -------------------------------- ### tablerowloop Properties Example Source: https://shopify.dev/docs/api/liquid/objects/tablerowloop This example demonstrates the properties available within a tablerowloop. It shows the 1-based and 0-based indices for columns and iterations, boolean flags for first/last items, and the total length of the loop. ```json { "col": 1, "col0": 0, "col_first": true, "col_last": false, "first": true, "index": 1, "index0": 0, "last": false, "length": 5, "rindex": 5, "rindex0": 4, "row": 1 } ``` -------------------------------- ### Blake3 Hash Output Example Source: https://shopify.dev/docs/api/liquid/filters/blake3 Shows the expected Blake3 hash output for an empty string. This serves as a reference for the filter's result. ```Plain Text af1349b9f5f9a1a6a0404dea36dcc9499bcb25c9adc112b7cc9a93cae41f3262 ``` -------------------------------- ### Shopify Search API Response Example Source: https://shopify.dev/docs/api/liquid/objects/search This is an example of the JSON response structure from a Shopify search API call, illustrating the available properties like terms, types, results count, and sorting information. ```json { "default_sort_by": "relevance", "filters": {}, "performed": true, "results": [], "results_count": 17, "sort_by": "relevance", "sort_options": [], "terms": "potion", "types": [ "article", "page", "product" ] } ``` -------------------------------- ### Product URL with Variant Parameter Source: https://shopify.dev/docs/api/liquid/objects/product This example shows the relative URL of a product, including the 'variant' parameter for the most relevant variant. This is typically used when a product is rendered in search results or a filtered collection. ```liquid /products/gorgeous-wooden-computer?variant=1234567890 ``` -------------------------------- ### Create Context-Aware Absolute URL Source: https://shopify.dev/docs/api/liquid/objects/request Use `request.origin` to prepend the shop's domain to a relative URL, ensuring it's absolute. This is useful for links or resource paths. ```liquid {{ product.selected_variant.url | default: product.url | prepend: request.origin }} ``` -------------------------------- ### Example Form Object Data Source: https://shopify.dev/docs/api/liquid/objects/form This JSON represents the data structure of a form object, showing example values for various properties. It's useful for understanding the expected output when interacting with form data in Liquid. ```json { "address1": "12 Phoenix Feather Alley", "address2": "1", "author": null, "body": null, "city": "Calgary", "company": null, "country": "Canada", "email": null, "errors": null, "first_name": "Cornelius", "id": "new", "last_name": "Potionmaker", "password_needed?": false, "phone": "44 131 496 0905", "posted_successfully?": true, "province": "Alberta", "set_as_default_checkbox": "", "zip": "T1X 0L4" } ``` -------------------------------- ### Example Image HTML Output Source: https://shopify.dev/docs/api/liquid/objects/image This snippet shows the HTML output for an image, including src, srcset, alt text, width, and height attributes. ```html
```
--------------------------------
### Example Media Object JSON
Source: https://shopify.dev/docs/api/liquid/objects/media
This is an example of the JSON structure for a media object, specifically an image, as it might appear in the Shopify API response. It includes common properties like alt text, ID, media type, and position.
```json
{
"alt": "Dandelion milk",
"id": 21772527435841,
"media_type": "image",
"position": 1,
"preview_image": {}
}
```
--------------------------------
### Example Data for all_products
Source: https://shopify.dev/docs/api/liquid/objects/all_products
This JSON structure represents the data that might be returned when accessing the all_products object, showing a product with its title.
```json
{
"all_products": {
"love-potion": {
"title": "Love Potion"
}
}
}
```