Download tasks/ace-hardware/environment/reference/clone/templates/cart.html from TIGER-Lab/WebsiteBench: direct link, hf CLI and curl.
- Browser
- Download file 3.93 kB
-
https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/ace-hardware/environment/reference/clone/templates/cart.html
- Command line
-
hf download hf://datasets/TIGER-Lab/WebsiteBench/tasks/ace-hardware/environment/reference/clone/templates/cart.html
-
curl -L -o cart.html https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/ace-hardware/environment/reference/clone/templates/cart.html
3.93 kB
| {% extends "base.html" %} | |
| {% block title %}Cart{% endblock %} | |
| {% block page_id %}cart{% endblock %} | |
| {% block content %} | |
| <div class="shell"> | |
| <h1 class="page-title">Your Cart {% if totals.item_count %}({{ totals.item_count }} item{{ 's' if totals.item_count != 1 }}){% endif %}</h1> | |
| {% if not totals['items'] %} | |
| <div class="empty-cart"> | |
| <p><strong>Your cart is empty.</strong></p> | |
| <p>Not sure where to start? Popular picks:</p> | |
| <p> | |
| <a class="btn btn-red" href="/departments/plumbing/plumbing-tools">Shop Plumbing Tools</a> | |
| <a class="btn btn-outline" href="/sales-specials">Sales & Specials</a> | |
| </p> | |
| </div> | |
| {% else %} | |
| <div class="cart-layout"> | |
| <section class="cart-items" aria-label="Cart items"> | |
| {% for item in totals['items'] %} | |
| <article class="cart-line" data-sku="{{ item.sku }}"> | |
| <a href="{{ canonical_pdp_path(item.product) }}" class="cart-thumb"> | |
| <img src="/static/img/products/{{ item.sku }}-0.svg" alt="{{ item.product.name }}" width="96" height="80"> | |
| </a> | |
| <div class="cart-line-info"> | |
| <a class="cart-line-name" href="{{ canonical_pdp_path(item.product) }}">{{ item.product.name }}</a> | |
| <p class="cart-line-meta">Item # {{ item.sku }} · | |
| {% if item.fulfillment == 'pickup' %}Store pickup{% if store %} at {{ store.name }}{% endif %}{% else %}Home delivery{% endif %} | |
| </p> | |
| <p class="cart-line-unit">{{ money(item.product.price_minor) }} each</p> | |
| <div class="cart-line-actions"> | |
| <form action="/cart/update" method="post" class="qty-form"> | |
| <input type="hidden" name="sku" value="{{ item.sku }}"> | |
| <label class="visually-hidden" for="qty-{{ item.sku }}">Quantity</label> | |
| <input id="qty-{{ item.sku }}" class="qty-input" type="number" name="quantity" min="0" max="99" value="{{ item.quantity }}"> | |
| <button class="btn btn-ghost" type="submit">Update</button> | |
| </form> | |
| <form action="/cart/remove" method="post"> | |
| <input type="hidden" name="sku" value="{{ item.sku }}"> | |
| <button class="btn btn-link remove-link" type="submit">Remove</button> | |
| </form> | |
| </div> | |
| </div> | |
| <p class="cart-line-total">{{ money(item.line_total_minor) }}</p> | |
| </article> | |
| {% endfor %} | |
| </section> | |
| <aside class="cart-summary" aria-label="Order summary"> | |
| <h2>Order Summary</h2> | |
| <form class="promo-form" action="/cart/promo" method="post"> | |
| <label for="promo-code">Promo code</label> | |
| <div class="promo-row"> | |
| <input id="promo-code" name="code" placeholder="e.g. SAVE10" {% if totals.promo_code %}value="{{ totals.promo_code }}" readonly{% endif %}> | |
| {% if totals.promo_code %} | |
| <button class="btn btn-ghost" name="clear" value="1" type="submit">Remove</button> | |
| {% else %} | |
| <button class="btn btn-outline" type="submit">Apply</button> | |
| {% endif %} | |
| </div> | |
| {% if totals.promo %}<p class="promo-applied">{{ totals.promo.label }}</p>{% endif %} | |
| </form> | |
| <dl class="summary-lines"> | |
| <div><dt>Subtotal</dt><dd id="summary-subtotal">{{ money(totals.subtotal_minor) }}</dd></div> | |
| {% if totals.discount_minor %}<div class="discount"><dt>Promo savings</dt><dd>−{{ money(totals.discount_minor) }}</dd></div>{% endif %} | |
| <div><dt>Delivery</dt><dd>{{ money(totals.shipping_minor) if totals.shipping_minor else 'Free' }}</dd></div> | |
| <div><dt>Estimated tax</dt><dd>Calculated at checkout</dd></div> | |
| <div class="summary-total"><dt>Estimated total</dt><dd>{{ money(totals.subtotal_minor - totals.discount_minor + totals.shipping_minor) }}</dd></div> | |
| </dl> | |
| <a class="btn btn-red btn-block btn-lg" id="checkout-btn" href="/checkout">Checkout</a> | |
| <p class="cart-fine">Payment is a local sandbox simulation. No real charge ever occurs.</p> | |
| </aside> | |
| </div> | |
| {% endif %} | |
| </div> | |
| {% endblock %} | |