{% extends 'oscar/promotions/baseproductlist.html'%}
{% load i18n %}
{% load product_tags thumbnail %}

{% block content %}
<section class="productlist">
    <div class="title bg-primary">
        <h3>{{ promotion.name }}</h3>
    </div>
    <div class="description">
    {{ promotion.description|safe }}
    </div>
    <div class="row">
        {% for product in products %}
        <div class="col-xs-10 col-sm-10 col-md-10 col-lg-10">
            <a href="{{ product.get_absolute_url }}" class="productlisting">
            {% with image=product.primary_image %}
                {% thumbnail image.original "50x50" crop="center" as thumb %}
                <img src="{{ thumb.url }}" alt="{{ product.get_title }}" class="rounded">
                {% endthumbnail %}
            {% endwith %}
            <span class="product">{{ product.get_title|truncatechars:25 }}</span>
            </a>
        </div>
        {% endfor %}
    </div>

    {% if block.link_url %}
        <a href="{{ block.link_url }}">{% trans "See more" %}</a>
    {% endif %}
</section>
{% endblock %}