Download tasks/llbean/environment/reference/clone/frontend/templates/cart.html from TIGER-Lab/WebsiteBench: direct link, hf CLI and curl.
- Browser
- Download file 6.73 kB
-
https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/llbean/environment/reference/clone/frontend/templates/cart.html
- Command line
-
hf download hf://datasets/TIGER-Lab/WebsiteBench/tasks/llbean/environment/reference/clone/frontend/templates/cart.html
-
curl -L -o cart.html https://huggingface.co/datasets/TIGER-Lab/WebsiteBench/resolve/main/tasks/llbean/environment/reference/clone/frontend/templates/cart.html
6.73 kB
| {% extends "base.html" %} | |
| {% import "_macros.html" as m %} | |
| {% block title %}Shopping Bag{% endblock %} | |
| {% block content %} | |
| <div class="Cart_container" aria-label="Shopping Cart"> | |
| <h1 class="ShoppingBagHeader_heading">Shopping Bag{% if viewer.signed_in %} for {{ viewer.display_name }}{% endif %}</h1> | |
| {% if message %}<p class="Cart_message" role="status">{{ message }}</p>{% endif %} | |
| {% if error %}<p class="Cart_error" role="alert">{{ error }}</p>{% endif %} | |
| <div class="Cart_body"> | |
| <section class="Cart_items"> | |
| {% if cart.empty %} | |
| <div class="EmptyCart_container"> | |
| <p class="EmptyCart_text">Your shopping bag is empty.</p> | |
| <a class="Button_buttonComponent Button_primary" href="/llb/shop/511742?page=new-arrivals">Shop New Arrivals</a> | |
| </div> | |
| {% else %} | |
| <div class="Cart_free-shipping"> | |
| <div class="Progress_bar"><span style="width: {{ cart.progress }}%"></span></div> | |
| <div class="Progress_labels"><span>$0</span><span>${{ cart.threshold|int }}</span></div> | |
| {% if cart.free_shipping %}<p class="Cart_free-shipping-text">This order qualifies for FREE SHIPPING!</p>{% endif %} | |
| </div> | |
| {% for item in cart.lines %} | |
| <div class="CartItem_container"> | |
| <a class="CartItem_image" href="/llb/shop/{{ item.product_id }}"> | |
| <img src="{{ item.grid_image }}" width="120" height="140" alt="{{ item.grid_image_alt }}"> | |
| </a> | |
| <div class="CartItem_details"> | |
| <a class="CartItem_name" href="/llb/shop/{{ item.product_id }}">{{ item.name }}</a> | |
| <p class="CartItem_attributes">Item: {{ item.item_number }}{% if item.color %} Color/Style: {{ item.color }}{% endif %}{% if item.size %} Size: {{ item.size }}{% endif %}</p> | |
| <p class="CartItem_price">Item Price:<span>${{ '%.2f'|format(item.unit_price) }}</span></p> | |
| {% if item.low_inventory %}<p class="CartItem_inventory">Hurry - Limited Quantities</p>{% endif %} | |
| <form class="Quantity_form" method="post" action="/cart/update"> | |
| <input type="hidden" name="item_id" value="{{ item.item_id }}"> | |
| <span class="Quantity_qty-label">Quantity:</span> | |
| <button type="submit" name="qty" value="{{ item.qty - 1 }}" aria-label="Decrease quantity">-</button> | |
| <span class="Quantity_value">Quantity: {{ item.qty }}</span> | |
| <button type="submit" name="qty" value="{{ item.qty + 1 }}" aria-label="Increase quantity">+</button> | |
| </form> | |
| <div class="CartItem_actions"> | |
| <form method="post" action="/cart/remove"> | |
| <input type="hidden" name="item_id" value="{{ item.item_id }}"> | |
| <button class="Button_buttonComponent Button_secondary Button_small" type="submit">Remove Item</button> | |
| </form> | |
| <form method="post" action="/cart/save"> | |
| <input type="hidden" name="item_id" value="{{ item.item_id }}"> | |
| <input type="hidden" name="saved" value="1"> | |
| <button class="Button_buttonComponent Button_secondary Button_small" type="submit">Save For Later</button> | |
| </form> | |
| </div> | |
| </div> | |
| </div> | |
| {% endfor %} | |
| {% endif %} | |
| <div class="SaveForLaterWrapper_container"> | |
| <h2 class="SaveForLaterWrapper_heading">Save For Later</h2> | |
| {% if cart.saved %} | |
| {% for item in cart.saved %} | |
| <div class="CartItem_container CartItem_saved"> | |
| <a class="CartItem_name" href="/llb/shop/{{ item.product_id }}">{{ item.name }}</a> | |
| <form method="post" action="/cart/save"> | |
| <input type="hidden" name="item_id" value="{{ item.item_id }}"> | |
| <input type="hidden" name="saved" value="0"> | |
| <button class="Button_buttonComponent Button_secondary Button_small" type="submit">Move to Bag</button> | |
| </form> | |
| <form method="post" action="/cart/remove"> | |
| <input type="hidden" name="item_id" value="{{ item.item_id }}"> | |
| <button class="Button_buttonComponent Button_secondary Button_small" type="submit">Remove Item</button> | |
| </form> | |
| </div> | |
| {% endfor %} | |
| {% else %} | |
| <p class="SaveForLaterWrapper_empty-text-container">Nothing to see here yet! Select 'Save for Later' to keep track of items you're not ready to buy</p> | |
| {% endif %} | |
| </div> | |
| </section> | |
| <aside class="OrderSummary_container"> | |
| <h2 class="OrderSummary_header">Order Summary</h2> | |
| <p class="OrderSummary_row"><span>{{ cart.units }} item{% if cart.units != 1 %}s{% endif %} in Bag:</span><span>${{ '%.2f'|format(cart.subtotal) }}</span></p> | |
| {% if cart.empty %} | |
| <p class="OrderSummary_row"><span>Est. Subtotal:</span><span>${{ '%.2f'|format(cart.subtotal) }}</span></p> | |
| {% else %} | |
| {% if cart.discount %}<p class="OrderSummary_row OrderSummary_discount"><span>Promotions:</span><span>-${{ '%.2f'|format(cart.discount) }}</span></p>{% endif %} | |
| <p class="OrderSummary_row"><span>Est. Shipping & Handling:</span><span>{% if cart.free_shipping %}FREE{% else %}${{ '%.2f'|format(cart.shipping) }}{% endif %}</span></p> | |
| <p class="OrderSummary_row"><span>Est. Tax:</span><span>${{ '%.2f'|format(cart.tax) }}</span></p> | |
| <p class="OrderSummary_row OrderSummary_total"><span>Est. Total:</span><span>${{ '%.2f'|format(cart.total) }}</span></p> | |
| {% endif %} | |
| <div class="CheckoutOptions_container"> | |
| <a class="Button_buttonComponent Button_transactional Button_large {% if cart.empty %}Button_disabled{% endif %}" | |
| href="{% if cart.empty %}/shoppingbag{% else %}/checkout{% endif %}">CHECKOUT</a> | |
| <span class="CheckoutOptions_options-separator">OR</span> | |
| </div> | |
| <form class="OrderPromotions_form" method="post" action="/cart/redeem"> | |
| <h3 class="OrderPromotions_promotion-header">Add Promo Code or Gift Card</h3> | |
| <input class="OrderPromotions_input" type="text" name="code" aria-label="Promo code or gift card number"> | |
| <button class="Button_buttonComponent Button_secondary" type="submit">Redeem</button> | |
| </form> | |
| {% for promo in cart.promotions %} | |
| <p class="OrderPromotions_applied">{{ promo.label }} ({{ promo.code }})</p> | |
| {% endfor %} | |
| <p class="Cart_shopping-bag-id">Shopping Bag ID: {{ cart.cart_id[:4] }}-{{ cart.cart_id[4:8] }}</p> | |
| </aside> | |
| </div> | |
| <section class="RecentlyViewedList_container"> | |
| <h2 class="RecentlyViewedList_heading">Recently Viewed Items</h2> | |
| {{ m.product_grid(recently) }} | |
| </section> | |
| </div> | |
| {% endblock %} | |