Skip to content
Snippets Groups Projects
Select Git revision
  • f498c474774f8e7cee83300bb9277ee6f664efa8
  • main default protected
2 results

basket.html

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    basket.html 1.45 KiB
    {% extends "base.html" %}
    
    {% block content %}
    
    <div class="form-container">
        <div class="form">
            <h1>Your Basket</h1>
    
            <table class="styled-table">
                <thead>
                    <tr>
                        <th>Item</th>
                        <th>Price</th>
                        <th>Quantity</th>
                        <th>Total</th>
                        <th>Action</th>
                    </tr>
                </thead>
                <tbody>
                    {% for basket in items %}
                    <tr>
                        <td>{{ basket.item.name }}</td>
                        <td>£{{ basket.item.price }}</td>
                        <td>{{ basket.quantity }}</td>
                        <td>£{{ basket.item.price * basket.quantity }}</td>
                        <td>
                            <form action="{{ url_for('main.modify_basket', item_id=basket.item_id) }}" method="POST">
                                <button type="remove" name="action" class="button" value="remove">-</button>
                                <button type="add" name="action" class="button" value="add">+</button>
                            </form>
                        </td>
    
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
            <h2>Total Price: £{{ total_price }}</h2>
            <a class="button" href="{{ url_for('main.shop') }}">Continue Shopping</a>
            <a class="button" href="{{ url_for('main.checkout') }}">Go to Checkout</a>
        </div>
    
    </div>
    
    
    {% endblock %}