<div id="cart" class="btn-group btn-block">
  <button type="button" data-toggle="dropdown" data-loading-text="{{ text_loading }}" class="btn btn-inverse btn-block btn-lg dropdown-toggle"><span id="cart-total">{{ text_items }}</span></button>
  <ul class="dropdown-menu pull-right">
	{% if products or vouchers %}
    <li>
      <span class="cart-dropdown-menu-close"><i class="ion-android-close"></i></span>
	  <table class="table table-striped">
        {% for product in products %}
        <tr>
          <td class="text-center cart-image">{% 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 cart-info">
			<a href="{{ product.href }}">{{ product.name }}</a> {% if product.option %}
            {% for option in product.option %} 
            - <small>{{ option.name }} {{ option.value }}</small> {% endfor %}
            {% endif %}
            {% if product.recurring %} 
            - <small>{{ text_recurring }} {{ product.recurring }}</small> {% endif %}
			<p>
			<span class="cart-quantity">{{ product.quantity }} x</span>
			<span class="cart-product-price">{{ product.total }}</span>
			</p>
			</td>
          
          <td class="text-center"><button type="button" onclick="cart.remove('{{ product.cart_id }}');" title="{{ button_remove }}" class="btn btn-danger btn-xs button-cart-remove"><i class="ion-android-close"></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 button-cart-remove"><i class="ion-android-close"></i></button></td>
        </tr>
        {% endfor %}
      </table>
    </li>
    <li>
      <div>
        <table class="table table-bordered">
          {% for total in totals %}
          <tr>
            <td class="text-left"><strong>{{ total.title }}</strong></td>
            <td class="text-right">{{ total.text }}</td>
          </tr>
          {% endfor %}
        </table>
        <p class="text-right"><a href="{{ cart }}"><strong><i class="fa fa-shopping-cart"></i> {{ text_cart }}</strong></a><a href="{{ checkout }}"><strong><i class="fa fa-share"></i> {{ text_checkout }}</strong></a></p>
      </div>
    </li>
    {% else %}
    <li>
      <span class="cart-dropdown-menu-close"><i class="ion-android-close"></i></span>
	  <p class="text-center">{{ text_empty }}</p>
    </li>
    {% endif %}
  </ul>
</div>
