{# # Product Image Gallery (Bootstrap 5 Override) # # Renders the product image gallery with main image and thumbnail strip. # # Expected context: # product - WC_Product object # post_thumbnail_id - Main image attachment ID # columns - Number of thumbnail columns # gallery_image_ids - Array of gallery attachment IDs # main_image_html - Pre-rendered main image HTML # # WooCommerce PHP equivalent: single-product/product-image.php # # @package WcBootstrap # @since 0.1.0 #} {# Compute image data from the product object (PHP template does this locally). #} {% set post_thumbnail_id = product.get_image_id() %} {% set gallery_image_ids = product.get_gallery_image_ids() %} {% set cols = apply_filters('woocommerce_product_thumbnails_columns', 4) %} {% set has_images = post_thumbnail_id %} {% set gallery_classes = 'woocommerce-product-gallery woocommerce-product-gallery--columns-' ~ cols %} {% if has_images %} {% set gallery_classes = gallery_classes ~ ' woocommerce-product-gallery--with-images' %} {% else %} {% set gallery_classes = gallery_classes ~ ' woocommerce-product-gallery--without-images' %} {% endif %}