{%- comment -%} MIT License · (c) 2026 Lintel · https://lintelagency.com/resources/shopify-sections {%- endcomment -%} {%- comment -%} Product bundle ("buy it together"): two or three products you pick, each with its image, price and variant menu, a running total and one button that adds them all to the cart through Shopify's Cart AJAX API (/cart/add.js). Shoppers can leave a product out with its checkbox. The section only displays prices: a bundle discount has to be set up in Shopify (Discounts), and the optional discount note is text you type. Without JavaScript the form posts every available product to /cart/add. Sold-out products are shown but never added. Depends on: nothing. {%- endcomment -%} {%- liquid assign s = section.settings assign heading_tag = s.heading_tag | default: 'h2' assign uid = 'LibBundle-' | append: section.id -%}
Pieces that are made to be used together.
" }, { "type": "text", "id": "discount_note", "label": "Discount note", "info": "Optional, e.g. 10% off when bought together. Only text: set up the discount itself in Shopify." }, { "type": "header", "content": "Words" }, { "type": "text", "id": "button_label", "label": "Button", "default": "Add all to cart" }, { "type": "text", "id": "total_label", "label": "Total", "default": "Total" }, { "type": "text", "id": "include_label", "label": "Screen reader: before each product's checkbox", "default": "Include" }, { "type": "text", "id": "variant_label", "label": "Screen reader: variant menu", "default": "Options" }, { "type": "text", "id": "sold_out_label", "label": "Sold out", "default": "Sold out" }, { "type": "text", "id": "sale_label", "label": "Screen reader: sale price", "default": "Sale price" }, { "type": "text", "id": "regular_label", "label": "Screen reader: regular price", "default": "Regular price" }, { "type": "text", "id": "added_message", "label": "Message when added", "default": "Added to your cart." }, { "type": "text", "id": "error_message", "label": "Message when adding fails", "default": "These products could not be added. Please try again." }, { "type": "text", "id": "empty_message", "label": "Message when nothing is chosen", "default": "Choose at least one product." }, { "type": "select", "id": "after_add", "label": "After adding", "info": "Staying on the page sends a cart:refresh event that many themes use to update the cart count.", "options": [ { "value": "cart", "label": "Go to the cart" }, { "value": "stay", "label": "Stay and show the message" } ], "default": "cart" }, { "type": "header", "content": "Layout" }, { "type": "select", "id": "image_ratio", "label": "Image shape", "options": [ { "value": "square", "label": "Square" }, { "value": "portrait", "label": "Portrait (4:5)" } ], "default": "square" }, { "type": "select", "id": "section_width", "label": "Width", "options": [ { "value": "page", "label": "Page width" }, { "value": "full", "label": "Full width" } ], "default": "page" }, { "type": "text_alignment", "id": "text_alignment", "label": "Heading alignment on desktop", "default": "left" }, { "type": "select", "id": "text_alignment_mobile", "label": "Heading alignment on mobile", "options": [ { "value": "left", "label": "Left" }, { "value": "center", "label": "Center" }, { "value": "right", "label": "Right" } ], "default": "left" }, { "type": "header", "content": "Colors" }, { "type": "color", "id": "color_bg", "label": "Background", "default": "#FFFDF9" }, { "type": "color_background", "id": "color_bg_gradient", "label": "Background gradient", "info": "Optional. Covers the background color." }, { "type": "color", "id": "color_text", "label": "Text", "default": "#1C1917" }, { "type": "color", "id": "color_accent", "label": "Button and checkboxes", "default": "#1C1917" }, { "type": "color", "id": "color_accent_text", "label": "Button text", "default": "#FFFDF9" }, { "type": "color", "id": "color_card", "label": "Card and total background", "default": "#F5F2EC" }, { "type": "color", "id": "color_sale", "label": "Sale price and discount note", "default": "#B4432F" }, { "type": "header", "content": "Spacing and visibility" }, { "type": "range", "id": "padding_top", "label": "Top padding on desktop", "min": 0, "max": 200, "step": 4, "unit": "px", "default": 72 }, { "type": "range", "id": "padding_bottom", "label": "Bottom padding on desktop", "min": 0, "max": 200, "step": 4, "unit": "px", "default": 72 }, { "type": "range", "id": "padding_top_mobile", "label": "Top padding on mobile", "min": 0, "max": 160, "step": 4, "unit": "px", "default": 44 }, { "type": "range", "id": "padding_bottom_mobile", "label": "Bottom padding on mobile", "min": 0, "max": 160, "step": 4, "unit": "px", "default": 44 }, { "type": "select", "id": "show_on", "label": "Show on", "options": [ { "value": "all", "label": "All devices" }, { "value": "desktop", "label": "Desktop only" }, { "value": "mobile", "label": "Mobile only" } ], "default": "all" }, { "type": "text", "id": "anchor_id", "label": "Anchor ID", "info": "Optional. Link to this section with #your-id." }, { "type": "header", "content": "Motion" }, { "type": "checkbox", "id": "animate", "label": "Fade in the products on load", "info": "Always off for visitors who prefer reduced motion.", "default": false } ], "blocks": [ { "type": "product", "name": "Product", "limit": 3, "settings": [ { "type": "product", "id": "product", "label": "Product" }, { "type": "range", "id": "quantity", "label": "Quantity", "min": 1, "max": 5, "step": 1, "default": 1 }, { "type": "checkbox", "id": "checked", "label": "Included by default", "default": true } ] } ], "presets": [ { "name": "Lib · Product bundle", "blocks": [ { "type": "product" }, { "type": "product" }, { "type": "product" } ] } ] } {% endschema %}