{% if journal3.get('catalogMiniCartStatus') %}
<div id="cart" class="dropdown {% if products or vouchers %}cart-has-items{% endif %}">
  <a href="{{ journal3.get('cartStyleCartCheckoutLink') ? cart : 'javascript:;' }}" data-toggle="dropdown" data-loading-text="{{ text_loading }}" class="dropdown-toggle cart-heading" title="{{ text_cart }}">
    {% if journal3.get('cartStyleCartCustomText') == 'default' %}
    <span id="cart-total"><span class="cart-title">{{ journal3.get('cartStyleCartTitle') }}</span><span class="cart-text">{{ text_items }}</span></span>
    {% endif %}
    <em class="fa fa-shopping-cart">
      <span id="cart-items" class="count-badge {% if not items_count %}count-zero{% endif %}">{{ items_count }}</span>
      {% if journal3.get('cartStyleCartCustomText') == 'custom' %}
        <span class="cart-label">{{ journal3.get('cartStyleCartLabel') }}</span>
      {% endif %}
    </em>
  </a>
  <div id="cart-content" class="dropdown-menu cart-content j-dropdown">
  <ul>
    {% if products or vouchers %}
    <li class="cart-products">
      <table class="table">
        {% for product in products %}
        <tr>
          <td class="text-center td-image">{% if product.thumb %} <a href="{{ product.href }}"><img src="{{ product.thumb }}" srcset="{{ product.thumb }} 1x, {{ product.thumb2x }} 2x" alt="{{ product.name }}" title="{{ product.name }}" class="img-thumbnail" /></a> {% endif %}</td>
          <td class="text-left td-name"><a href="{{ product.href }}">{{ product.name }}</a><br > {% if product.option %}
            {% for option in product.option %}
            <span>{{ option.name }}</span><small> {{ option.value }}</small><br /> {% endfor %}
            {% endif %}
            {% if product.recurring %}
            <span>{{ text_recurring }}</span><small> {{ product.recurring }}</small> {% endif %}</td>
          <td class="text-right td-qty">x {{ product.quantity }}</td>
          <td class="text-right td-total">{{ product.total }}</td>
          <td class="text-center td-remove"><button type="button" onclick="cart.remove('{{ product.cart_id }}');" title="{{ button_remove }}" class="cart-remove"><i class="fa fa-times"></i></button></td>
        </tr>
        {% endfor %}
        {% for voucher in vouchers %}
        <tr>
          <td class="text-center td-image"></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 td-remove"><button type="button" onclick="voucher.remove('{{ voucher.key }}');" title="{{ button_remove }}" class="cart-remove"><i class="fa fa-times"></i></button></td>
        </tr>
        {% endfor %}
      </table>
    </li>
    <li class="cart-totals">
      <div>
        <table class="table table-bordered">
          {% for total in totals %}
          <tr>
            <td class="text-right td-total-title">{{ total.title }}</td>
            <td class="text-right td-total-text">{{ total.text }}</td>
          </tr>
          {% endfor %}
        </table>
        <div class="cart-buttons">
          <a class="btn-cart btn" href="{{ cart }}"><i class="fa"></i><span>{{ text_cart }}</span></a>
          <a class="btn-checkout btn" href="{{ checkout }}"><i class="fa"></i><span>{{ text_checkout }}</span></a>
        </div>
      </div>
    </li>
    {% else %}
    <li>
      <p class="text-center cart-empty">{{ journal3_is_oc4 ? text_no_results : text_empty }}</p>
    </li>
    {% endif %}
  </ul>
  </div>
</div>
{% endif %}
