【メタフィールド】アプリなしで販売の開始日時を指定したい(Prestige)- I want to set the start date and time of sales

Topic summary

ユーザーがShopifyのPrestigeテーマで、アプリを使わずに商品ごとの販売開始日時を設定したいと質問。具体的には、販売開始前は購入ボタンを「coming soon」にし、再入荷日時を表示したい。商品写真や説明は閲覧可能な状態を維持したい。

専門家の回答:

  • メタフィールドはブラウザキャッシュの問題で推奨されない
  • 代替案としてShopify Flowを使った方法を提案:
    1. 特定のタグ(例:「販売開始_〇月〇日〇時」)を持つ商品の購入ボタンを非活性化するコードをテーマに実装
    2. 対象商品にタグを付与
    3. Shopify Flowで予定時刻トリガーを設定し、指定時刻にタグを自動削除
    4. タグ削除により購入ボタンが自動的に有効化

実装サポート:

  • Prestigeテーマ用の具体的なコード(buy-buttons.liquidの置き換えコード)が提供された
  • ユーザーは提供されたコードで無事に動作を確認し、解決

参考記事とコードスニペットが共有され、質問者は満足して終了。

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

ご確認ありがとうございます。

prestigeテーマですと、対応ファイルが違っていまして、スニペットフォルダ内の「buy-buttons.liquid」の中身をまるっと下記のコードと入れ替えてみてください。

{%- comment -%}
----------------------------------------------------------------------------------------------------------------------
BUY BUTTONS
----------------------------------------------------------------------------------------------------------------------

This component is used to show the buy buttons

********************************************
Supported variables
********************************************

* product: the product from which to show the buttons (if empty, a placeholder is displayed)
* show_payment_button: if we show or not the dynamic checkout button
* show_gift_card_recipient: for gift card products, an optional message/email to be sent to the recipient
* atc_button_background: the background of the ATC button
* atc_button_text_color: the color of the ATC button
* payment_button_background: the background of the dynamic payment button
* payment_button_background: the color of the dynamic payment button
* form_id: if specified, define the form ID linked to this input
{%- endcomment -%}
{% if product.tags contains '販売開始日時指定' %}
  {% for tag in product.tags %}
    {% if tag contains '販売開始日時指定テキスト_' %}
      {{ tag | remove:'販売開始日時指定テキスト_' }}

      
    {% endif %}
  {% endfor %}
{% else %}
  {%- if product != blank -%}
  {%- assign variant_picker_block = section.blocks | where: 'type', 'variant_picker' | first -%}

  {%- assign recipient_feature_active = false -%}

  {%- if product.gift_card? and show_gift_card_recipient -%}
    {%- assign recipient_feature_active = true -%}
    {%- assign show_payment_button = false -%}
  {%- endif -%}

  {%- form 'product', product, is: 'product-form', id: form_id -%}
    

    {% liquid
      assign button_disabled = false

      if product.selected_or_first_available_variant.available == false
        assign button_disabled = true
        assign button_content = 'product.general.sold_out_button' | t
      else
        if product.template_suffix contains 'pre-order'
          assign button_content = 'product.general.pre_order_button' | t
        else
          assign button_content = 'product.general.add_to_cart_button' | t
        endif
      endif
    %}

    

      {%- if recipient_feature_active -%}
        
      {%- endif -%}

      
    

  {%- endform -%}
{%- else -%}
  
{%- endif -%}
{% endif %}