{% comment %} Option 1 - Product Page: Opt-in Modal Most recommended option: highest attach rate. REPLACES the theme's buy-buttons section. The Add to Cart button is swapped for one that opens a modal summarising the coverage included in the protection plan, so the customer opts in before the item reaches the cart. Render it in place of your buy-buttons snippet, e.g. in sections/main-product.liquid instead of the default {% render 'buy-buttons' %}. Usage: {% render 'product-opt-in-modal', product: product, block: block, product_form_id: product_form_id, section_id: section.id %} Requirements: - `product`: the product being purchased. Protection plans are discovered via the `akko.plan` metafield (list of product references). - `block`: the block object (for shopify_attributes). - `product_form_id`: the product form id string. - `section_id`: passed through so IDs stay unique if the section renders multiple times. - `show_pickup_availability`: optional boolean. When true the pickup availability block is rendered. --------------------------------------------------------------------------- REFERENCE EXAMPLE - adapt before use. Provided as a starting point and written against Shopify's Dawn theme. Markup, class names and styling will need adjusting to fit your own theme. Always test in a duplicated, unpublished theme before publishing. AKKO does not warrant this code as production-ready for any particular store. --------------------------------------------------------------------------- {% endcomment %}