Skip to content

Design in relation ​

Documentation scope: Guild 0.1.x pre-release builds. The exact public release version will be confirmed in the changelog before Theme Store publication.

Design in relation shows why two products belong together. It uses a product as the source (X) and one or more related products (Y), with a separate Shopify metaobject (R) describing each connection. It is a Product list preset in the d. Collections block picker, not a separate Shopify product type or automatic recommendation service.

1. Prepare the Shopify data ​

  1. In Shopify Admin > Settings > Custom data > Metaobjects, create a definition with the type design_connection. Make its entries available to the storefront.
  2. Add a Product reference field with the key related_product. This identifies product Y.
  3. Add Single line text fields source_caption, source_label, related_caption, and related_label for the copy you want to display. Each text is independent; leave optional copy blank if it does not apply.
  4. In Settings > Custom data > Products, create the custom.design_connections metafield as a List of metaobject references, restricted to design_connection. Populate it on each source product X with the relevant metaobject entries in your preferred order.
  5. Make sure X and Y are published to the Online Store and have their own appropriate product media. Guild reads these definitions and values; it does not create them for you.

Optionally add source_image and related_image fields to design_connection as File references restricted to images. The Custom blocks layout uses the first rendered connection's source image for X and each connection's related image for its Y card. If an image is absent, inaccessible, or not an image, that card uses its normal product media. Product titles, prices, and links still come from the actual product data.

Only use a representative detail that accurately describes the product. Editorial images remain fixed across variant changes and replace the normal second-image hover behavior for that card. Leave the optional field empty if different finishes or sizes need variant-specific images. This override does not apply to Global cards or ordinary Product list sources.

2. Add the preset ​

  1. Open the Guild Theme Editor and the template or section where product lists are allowed.
  2. In Add block > d. Collections, choose Design in relation.
  3. Keep Product source: Design connections and Card architecture: Custom blocks.
  4. On a Product page, leave Selected products empty to use the current product as X. On other templates, choose the source X as the first Selected product. A non-PDP list without a selected X has no relation data to show. Selecting an X on a Product page overrides the preview product.
  5. Set Products to the maximum number of related Y products, not the number of cards including X. The preset begins with Products: 1 and Columns: 2. Increase the limit to display more connections.

The list examines at most the first 50 entries from X's custom.design_connections field. The Featured source X uses copy and its optional image from the first relation that actually renders after filtering and availability ordering, which may differ from the first stored entry. A connection with a missing product Y does not generate a usable related card; verify the referenced product and storefront availability. The Unavailable products setting controls whether unavailable products are hidden, faded, or shown where applicable.

3. Edit the two native card owners ​

The preset contains one Featured product item for X and one Product item reused for each related Y. It does not add two ordinary Product item blocks or automatically insert relation text into Product media.

  • Featured product item (X) uses the first rendered connection's optional source image or the source product's catalog media. Its default content includes configurable Product metafields for Source caption and Source label from the first rendered connection.
  • Product item (Y) uses the current connection's optional related image or Y's catalog media and contains a native Row - Product item. The row's left Column - Product item contains two Product metafields blocks; the right column contains Purchase controls configured as a link to the product page. These are standard editable theme blocks, not special hard-coded relation HTML.
  • To change relation copy, open Product metafields > Product metafield, select Source: Design connection, and choose Source caption, Source label, Related caption, or Related label. The values come from the particular R metaobject. No fallback marketing sentence is generated by the theme.
  • To show ordinary product data on Y instead, select the product metafield source and namespace/key. Current page product refers to the PDP's product, not an arbitrary source override on a non-Product page.

The preset does not automatically create caption or label values. Add or edit those values in Shopify Admin. Changing the layout or field choice in the Theme Editor changes presentation only, not the underlying Shopify product or connection entries.

4. Layout and storefront checks ​

For an exact visual pair, keep Products: 1. With multiple related products, X appears only once and represents the first rendered connection; use a common X motif for additional connections if you want the comparison to remain coherent.

The default Mobile layout: Scroll uses the existing Product list mobile-scrolling behavior; desktop starts with two grid columns. The preset does not enable list Pagination. Adjust grid gaps, borders, media ratio, text styles, and column widths through existing controls rather than custom CSS.

Before publishing, preview a Product page with a valid connection and a page with Selected products providing X. Confirm:

  • X appears in the Featured slot and each Y has its own image, URL, variant state and purchase action.
  • Every caption and label matches the selected connection R. A wrong source/related field selection changes which text appears.
  • Empty or unpublished references do not create misleading product links or copied text.
  • Desktop grid and mobile scroll work at narrow widths, including touch, keyboard, focus, RTL and reduced-motion states where applicable.
  • Product availability, no-JavaScript navigation, and cart/product-page fallbacks behave as expected.

Saving an already-added block does not replace its nested block composition with a newer preset. To use an updated preset structure, add a new instance in an unpublished theme and compare it with the existing instance before replacing anything.

Troubleshooting ​

No cards: Check that X is correctly selected, custom.design_connections contains metaobject entries, related_product points to an Online Store product, and the correct product is being previewed.

Captions work but image or link is incorrect: Verify the optional source and related image references, check that the files are images, verify the Y product reference, check the native Product item/Row/Column nesting, and test in the actual storefront HTML. A Theme Editor preview alone does not prove that the correct product context reaches Purchase controls.

No relation text: The block reads only the field selected in Source: Design connection. Check that this field is populated on the relevant R entry. Static example text elsewhere in the editor does not populate the connection.

For related workflows, see Metafields and dynamic sources, Product page setup, Commerce and product discovery, and Why content is missing.

Merchant documentation for the Guild Shopify theme.