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>
51 lines
1.7 KiB
PHP
51 lines
1.7 KiB
PHP
<?php
|
|
$shopifyHandle = $page->shopifyHandle()->or($page->slug());
|
|
|
|
snippet('header', ['title' => $page->title(), 'template' => 'shop']);
|
|
?>
|
|
|
|
<main>
|
|
<nav class="store__nav">
|
|
<a href="<?= $site->homePage()->url() ?>"><?= t('backToShop') ?></a>
|
|
</nav>
|
|
|
|
<section class="section__product"
|
|
data-product-loader
|
|
data-shopify-handle="<?= $shopifyHandle ?>"
|
|
data-language="<?= $kirby->language()->code() ?>">
|
|
|
|
<div class="product-loading">
|
|
<p><?= t('loading') ?></p>
|
|
</div>
|
|
|
|
<div class="product-content" style="display: none;">
|
|
<div class="col-left">
|
|
<div class="hero">
|
|
<h2 class="p__baseline-big" data-product-title></h2>
|
|
<p class="p__baseline-big" data-product-price></p>
|
|
</div>
|
|
|
|
<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>
|
|
|
|
<div class="product-gallery swiper">
|
|
<div class="swiper-wrapper" data-product-images></div>
|
|
<div class="swiper-button-prev"></div>
|
|
<div class="swiper-button-next"></div>
|
|
<div class="swiper-pagination"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="product-error" style="display: none;">
|
|
<p><?= t('productNotFound') ?></p>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<?php snippet('footer', ['scripts' => ['product']]) ?>
|