acquia_commercemanager-8.x-1.122/modules/acm_customer/templates/user-order.html.twig
modules/acm_customer/templates/user-order.html.twig
{#
/**
* @file
*
* Default user order template.
*
* Available variables:
* - attributes: HTML attributes for the wrapper.
* - order_details_path: The path to the order details.
* - order: Order information received from connector.
* Each order will have the following elements:
* - customer_id: Customer ID from the commerce backend.
* - store_id: The store ID from the commerce backend.
* - increment_id: [?]
* - created_at: The date the order was created.
* - group_id: [?]
* - email: The email that was used to place the order.
* - firstname: [?]
* - lastname: [?]
* - billing:
* - address_id: The customers address ID.
* - firstname: The name to address the delivery to.
* - lastname: The name to address the delivery to.
* - street: The street that was.
* - street2: Second stree entry.
* - city: The city string.
* - region: The region that was chosen.
* - postcode: The postcode.
* - country_id: The 2 letter country code.
* - telephone: The entered phone number.
* - default_billing: [?]
* - default_shipping: [?]
* - customer_address_id: [?]
* - customer_id: [?]
* - extension: [?]
* - shipping:
* - totals
* - sub: Sub total formatted to 2 decimal places.
* - tax: Total tax amount formatted to 2 decimal places.
* - discount: Discount amount applied formatted to 2 decimal places.
* - grand: Grand total of the order formatted to 2 decimal places.
* - items:
* Each item will have the following elements:
* - product_id: The product ID.
* - sku: The product SKU.
* - name: The product name.
* - type: The product type.
* - price: The price of the product.
* - ordered: The order quantity.
* - shipped: The quantity of items shipped.
* - refunded: The quantity of items refunded.
* - coupon: The coupon code that has been applied.
* - payment:
* - method_code: [?]
* - method_title: [?]
* - amount: The amount that has been payed
* - extension:
* - cc_last4: Last 4 digits for the credit card.
* - cc_year: The expiration year.
* - cc_month: The expiration month.
* - status: Status of the order.
* - state
* - extension
*
* @ingroup themeable
*/
#}
<div{{ attributes.addClass(['customer-order']) }}>
<div class="customer-order__order-id">
<div class="customer-order__order-id-label">{{ 'Order #'|t }}</div>
<div class="customer-order__order-id-value">{{ order.order_id }}</div>
</div>
<div class="customer-order__order-date">
<div class="customer-order__order-date-label">{{ 'Order Placed'|t }}</div>
<div class="customer-order__order-date-value">{{ order.created_at|date('U')|format_date('short') }}</div>
</div>
<div class="customer-order__order-total">
<div class="customer-order__order-total-label">{{ 'Total'|t }}</div>
<div class="customer-order__order-total-value">{{ order.totals.grand }}</div>
</div>
<div class="customer-order__details-button">
<a class="customer-order__details-button-link" href="{{ order_details_path }}">{{ 'Details'|t }}</a>
</div>
</div>
