{% load theme_builder_design theme_builder_context ecommerce_blocks shop_texts %}{% comment %}Story 17.8 — closed purchase block copied from product_detail.html; csrf comes from tb_render (`only`); fixed ids stay off the block_wrapper_attrs element.{% endcomment %} {% check_block_has_context bloc tb_render as has_context %}{% if has_context %}{% get_shop_block_options bloc as options %}{% with page_context=tb_render.page_context request=tb_render.page_context.requete %} {% with produit=page_context.produit selecteur=page_context.selecteur form=page_context.formulaire_ajout stock_label=page_context.etiquette_stock price_label=page_context.prix_texte shop_settings=page_context.reglages_boutique %} {% if price_label or selecteur or page_context.achat_possible %}
{{ price_label }}
{% endif %} {% if page_context.achat_possible %} {% comment %}Variant pages: the stock line and the buy block follow the picked variant (product-variants.js), so both always exist.{% endcomment %}{% if stock_label %}{{ stock_label }}{% else %}{% shop_text "product_in_stock" %}{% endif %}
{% if selecteur %}{% include "ecommerce/_variant_selector.html" with variant_selector=selecteur is_sold_out_hidden=page_context.masquer_declinaisons_epuisees sold_out_text=page_context.texte_declinaison_epuisee missing_text=page_context.texte_declinaison_manquante variant_script_data=page_context.donnees_script_declinaisons request=request %}{% endif %} {% if form %}