Taste Theme buy-buttons.liquid sold out products

Topic summary

A developer is troubleshooting unexpected behavior with the buy-buttons.liquid file in a Shopify theme (Taste Theme).

Core Issue:
The variable quantity_rule_soldout does not update dynamically when users select different product variants (size/color) on the product detail page. It only refreshes after a complete page reload and then remains static.

Desired Outcome:
Hide the dynamic checkout button when a product variant is unavailable/sold out.

Technical Context:
The developer attempted to wrap the payment button form code with conditional logic using unless quantity_rule_soldout and references block.settings.show_dynamic_checkout, but the variable’s value (true/false) doesn’t respond to variant selection changes.

Status:
The question remains unanswered, seeking clarification on why the liquid block doesn’t refresh when clicking between sold out and available variants.

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

HI all,

I am a little confused about the behaviour in the product detail.
it’s about the liquid file buy-buttons.liquid. i actually thought that if i click on the variants size and colour in the product detail then the variable quantity_rule_soldout would also change depending on whether the product is available or not but it only changes after a complete page reload and then always remains the same no matter whether a product is sold out or not it remains true or false.

what i want to achieve is to hidethe dynamic checkout button when product is not available.

something like this:

{%- if block.settings.show_dynamic_checkout -%}

{%- unless quantity_rule_soldout -%} → added code

{{ form | payment_button }}

{%- endunless*-%} → added code*
{%- endif -%}

Thanks for help

regads

stefan

Hi Again,

to make the question a little bit more tangible:

Why is the variable quantity_rule_soldout that is set in a liquid block not update/refreshed when i click on the product detail page on variants that are sold out or available?

ragards

Stefan