<?xml version="1.0"?>
<t name="Shop Product Grid" t-name="website_sale.shop_product_grid">
        <div id="o-grid-product" class="mb-3" data-name="Product Grid" t-att-data-image_spacing="website.product_page_image_spacing" t-att-data-grid_columns="website.product_page_grid_columns">
            <div class="container position-relative overflow-hidden">
                <span t-attf-class="o_ribbon #{ribbon._get_position_class()}" t-attf-style="#{text_color and ('color: %s; ' % text_color)}#{bg_color and 'background-color:' + bg_color}" t-out="ribbon['name'] or ''"/>
                <!-- One row for every two images -->
                <t t-set="image_classes" t-value="'w-100'"/>
                <div class="row">
                    <t t-foreach="website.product_page_grid_columns" t-as="col_idx">
                        <t t-set="col_feed_counter" t-value="0"/>

                        <div t-if="col_idx_index &lt; len(product_images)" class="col o_wsale_product_page_grid_column d-flex flex-column px-0">
                            <t t-foreach="len(product_images)" t-as="image_idx">
                                <t t-set="product_image" t-value="image_idx &lt; len(product_images) and product_images[image_idx] or False"/>
                                <t t-set="image_classes" t-value="website._get_product_page_grid_image_spacing_classes()"/>
                                <t t-if="product_image and col_idx == col_feed_counter" t-call="website_sale.shop_product_image"/>
                                <t t-if="col_feed_counter == (website.product_page_grid_columns - 1)">
                                    <t t-set="col_feed_counter" t-value="0"/>
                                </t>
                                <t t-else="">
                                    <t t-set="col_feed_counter" t-value="col_feed_counter + 1"/>
                                </t>
                            </t>
                        </div>
                    </t>
                </div>
            </div>
        </div>
    </t>

    