+{* Every block below is conditional, so the pane can come out with nothing in it. Capture it first and
+ emit the wrapper only when it holds something, so product.tpl can drop the tab instead of showing an
+ empty panel. Child themes overriding any block are unaffected - the blocks are unchanged. *}
+{capture name='product_details_content'}
{block name='product_reference'}
{if !empty($product_manufacturer.id)}
@@ -55,9 +54,14 @@
{/block}
{block name='product_out_of_stock'}
-
- {hook h='actionProductOutOfStock' product=$product}
-
+ {* The six sibling blocks all guard their markup; this one emitted its wrapper even when no module
+ answered the hook, which is what left the pane holding a single empty div. *}
+ {capture name='product_out_of_stock'}{hook h='actionProductOutOfStock' product=$product}{/capture}
+ {if trim($smarty.capture.product_out_of_stock) !== ''}
+
+ {$smarty.capture.product_out_of_stock nofilter}
+
+ {/if}
{/block}
{block name='product_features'}
@@ -98,4 +102,22 @@