- Add product loaders (product-loader.js, products-list-loader.js) to fetch data from Shopify - Extend Shopify API client with getProductByHandle() and getAllProducts() methods - Integrate Shopify metafields for multilingual support (custom.title_en, custom.description_en) - Refactor product.php and home.php templates to load content dynamically - Simplify product blueprint to minimal routing configuration - Create generic buy-button.php snippet with variant selection - Update footer.php with conditional script loading - Refactor _section--product.scss for better Sass structure - Add translations for loading states and product errors - Clean up old Kirby product content files Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
25 lines
860 B
PHP
25 lines
860 B
PHP
<div class="product-purchase">
|
|
<div class="product-stock-info">
|
|
<p data-product-stock class="stock-status"></p>
|
|
</div>
|
|
|
|
<div class="product-variants" data-product-variants style="display: none;">
|
|
<label for="variant-select"><?= t('selectVariant') ?></label>
|
|
<select id="variant-select" data-variant-selector></select>
|
|
</div>
|
|
|
|
<button
|
|
class="btn-add-to-cart"
|
|
data-shopify-add-to-cart
|
|
data-product-id=""
|
|
data-variant-id=""
|
|
data-text-add="<?= t('addToCart') ?>"
|
|
data-text-adding="<?= t('addingToCart') ?>"
|
|
data-text-added="<?= t('addedToCart') ?>"
|
|
data-text-error="<?= t('errorAddToCart') ?>"
|
|
data-text-out-of-stock="<?= t('outOfStock') ?>"
|
|
data-text-in-stock="<?= t('inStock') ?>"
|
|
>
|
|
<?= t('addToCart') ?>
|
|
</button>
|
|
</div>
|