CameraBuy / templates / cart / cartentry.twig
cartentry.twig
Raw
{% set product = craft.app.request.getParam('product') %}
{% set count = craft.app.request.getParam('count') %}

{% set entry = craft.entries.section('shop').id(product).one() %}


<div class="entry" id="entry{{ product }}">
    <img src="/assets/filesystem/productimg/{{entry.productimg.kind('image').one().getUrl()}}" alt="{{entry.productimg.kind('image').one().title}}">
    <div class="information">
        {% if entry.tags %}
        <p class='tag'>{{entry.tags}}</p>
        {% endif %}
        <a href="/shop/{{ entry.slug }}"><h2>{{entry.title}}</h2></a>
        <p class="description">{{entry.description}}</p>
        <p class="price">{{ entry.price|money}}</p>
    </div>
    <div class="count">
        <button onclick="subtractfromcart({{ product }})">-</button> <p>{{count}}</p><button onclick="addtocart({{ product }})" >+</button>
    </div>
    <button class="buttonlarge darkbutton" onclick="removefromcart({{ product }})">entfernen</button>
</div>