{% extends 'cart.html.twig' %}
{% block content %}
<div class="breadcrumb-block">
<div class="container">
<!-- breadcrumb of the page -->
<ul class="breadcrumb">
<li><a href="/{{ locale }}/" class="home">{{ 'espirits.header.home'|trans }}</a></li>
<li>{{ 'espirits.delivery.product-file-list'|trans }}</li>
</ul>
</div>
</div>
<div class="row container">
<div class="col-xs-12">
<div class="row">
<h1 class="page-heading-title">{{ 'espirits.delivery.product-file-list'|trans }}</h1>
{% if cart.getItems()|length == 0 %}
{{ 'cart.empty'|trans }}
{% else %}
<form method="post" action="{{ path('cart-update') }}">
<div class="col-xs-12 button-bar top">
<p class="product-count"><b>{{ 'cart.downloadlist'|trans }}: {{ cart.getItems()|length }}</b></p>
<div class="pull-right">
<a href="/{{ locale }}/product/" type="button" class="btn secondary">
{{ 'general.continue-shopping'|trans }}
</a>
<a id="js-checkout-button" href="{{ path('checkout') }}" class="btn primary">
{{ 'cart.checkoutnow'|trans }} <span class="glyphicon glyphicon-play"></span>
</a>
</div>
<div class="clearfix"></div>
</div>
<div class="col-sm-12 section-wrap">
<div class="row is-table-row">
{% for item in cart.getItems() %}
{% set linkDetail = item.getProduct().getDetailUrl() %}
<div class="col-xs-6 col-sm-3 col-md-2 product-wrap">
<div class="product">
<div class="inside">
<a href="{{ linkDetail }}">
<div class="product-image">
<img src="{{ item.getProduct().getFirstImage('downloadList', country) }}">
</div>
<div class="product-details">
<h4 class="media-heading"><a href="{{ linkDetail }}">{{ item.getProduct().getOSName() }}</a></h4>
</div>
</a>
<a class="btn close-button" href="{{ path('shop-remove-from-cart',{'item': item.getItemKey()}) }}">
<span>╳</span>
</a>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="col-sm-12 button-bar bottom">
<div class="pull-right">
<a href="/{{ locale }}/product/" type="button" class="btn secondary">
{{ 'general.continue-shopping'|trans }}
</a>
<a id="js-checkout-button" href="{{ path('checkout') }}" class="btn primary">
{{ 'cart.checkoutnow'|trans }} <span class="glyphicon glyphicon-play"></span>
</a>
</div>
<div class="clearfix"></div>
</div>
</form>
{% endif %}
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('.js-quantity').on('change', function() {
$('#js-update-button').removeClass('hidden');
$('#js-checkout-button').hide();
});
});
</script>
{% endblock %}