Add Shopify variant options selector with circular radio buttons
All checks were successful
Deploy / Deploy to Production (push) Successful in 7s

- Implement dynamic option rendering from Shopify variant data
- Generate circular radio buttons for product variants (sizes, colors, etc.)
- Disable add-to-cart button until option is selected
- Display "Choisissez une option" text when option required
- Update button text and enable on option selection
- Add is-selected class to chosen option
- Handle disabled state for out-of-stock variants
- Restore btn__default button style with icon and text structure
- Add chooseOption translation key in FR/EN

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-01-16 12:15:28 +01:00
parent 0c8cc5000c
commit 4987c4830f
5 changed files with 109 additions and 69 deletions

View file

@ -27,6 +27,10 @@ snippet('header', ['title' => $page->title(), 'template' => 'shop']);
<div class="details" data-product-details></div>
<div class="product-options" data-product-options style="display: none;">
<ul class="product-options__list" data-product-options-list></ul>
</div>
<?php snippet('buy-button') ?>
</div>