<div id="cart" class="btn-group">
  <button type="button" data-toggle="dropdown" data-loading-text="{{ text_loading }}" class="dropdown-toggle"><i class="fa fa-shopping-cart"></i> <span id="cart-total">{{ text_items }}</span></button>
  <ul class="dropdown-menu pull-right">
    {% if products or vouchers %}
    <li>
      <table class="table">
        {% for product in products %}
        <tr>
          <td class="text-center">{% if product.thumb %} <a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-thumbnail" /></a> {% endif %}</td>
          <td class="text-left product-td"><a href="{{ product.href }}">{{ product.name }}</a>
            {{ product.quantity }} x <span class="price">{{ product.total }}</span>
            {% if product.option %}
            {% for option in product.option %}
            <span class="cartoptions">- {{ option.name }} {{ option.value }}</span> {% endfor %}
            {% endif %}
            {% if product.recurring %}
            <span class="recurring">- {{ text_recurring }} {{ product.recurring }}</span> {% endif %}

          </td>
          <td class="text-center"><button type="button" onclick="cart.remove('{{ product.cart_id }}');" title="{{ button_remove }}" class="remove-btn"><i class="fa fa-times"></i></button></td>
        </tr>
        {% endfor %}
        {% for voucher in vouchers %}
        <tr>
          <td class="text-center"></td>
          <td class="text-left">{{ voucher.description }}</td>
          <td class="text-right">x&nbsp;1</td>
          <td class="text-right">{{ voucher.amount }}</td>
          <td class="text-center text-danger"><button type="button" onclick="voucher.remove('{{ voucher.key }}');" title="{{ button_remove }}" class="btn btn-danger btn-xs"><i class="fa fa-times"></i></button></td>
        </tr>
        {% endfor %}
      </table>
    </li>
    <li>
      <div>
        <table class="table table-total">
          {% for total in totals %}
          <tr>
            <td class="text-left">{{ total.title }}</td>
            <td class="text-right">{{ total.text }}</td>
          </tr>
          {% endfor %}
        </table>
        <p class="text-left table-total-btn">
          <a class="btn btn-block btn-default" href="{{ cart }}">{{ text_cart }}</a>
          <a class="btn btn-block btn-primary" href="{{ checkout }}">{{ text_checkout }}</a>
        </p>
      </div>
    </li>
    {% else %}
    <li>
      <p class="text-center">{{ text_empty }}</p>
    </li>
    {% endif %}
  </ul>
</div>
