{% extends "_layouts/cp" %} {% import "_includes/forms" as forms %} {% set selectedSubnavItem = "orders" %} {% set bodyClass = (bodyClass is defined ? bodyClass~' ' : '') ~ "commerceorders commerceordersedit" %} {% set crumbs = [ { label: "Orders"|t('commerce'), url: url('commerce/orders') } ] %} {% do view.registerTranslations('commerce', [ "“{key}” has invalid JSON", "A valid email is required to create a customer.", "Actions", "Add a line item", "Add an adjustment", "Add an option", "Add", "Address 1", "Address 2", "Address 3", "Adjustments", "Amount", "Are you sure you want to complete this order?", "Are you sure you want to overwrite the billing address?", "Are you sure you want to overwrite the shipping address?", "Are you sure you want to remove this customer?", "Are you sure you want to send email: {name}?", "Attention", "Available?", "billing address", "Billing Address", "Business ID", "Business Name", "Business Tax ID", "Cancel", "City", "Close", "Completed", "Copied!", "Copy", "Copy to {location}", "Couldn’t get order.", "Couldn’t recalculate order.", "Country", "Coupon Code", "Create your first line item", "Create customer: “{email}”", "Custom 1", "Custom 2", "Custom 3", "Custom 4", "Customer Note", "Customer", "Date Authorized", "Date Ordered", "Date Paid", "Delete", "Description", "Discount", "Done", "Download PDF", "Duplicate options exist", "Edit address", "Edit", "Edit options", "Email sent", "Enter coupon code", "Enter reference", "First Name", "Full Name", "Hide snapshot", "ID", "Included", "Invalid email.", "Invalid JSON", "IP Address", "Item", "Label", "Last Name", "Last Updated", "Line Item", "Mark as completed", "Message", "Name", "New address", "New Customer", "No address", "No billing address", "No description", "No private Note.", "No shipping address", "None", "Not available", "Notes", "Number", "Options", "Order recalculated.", "Origin", "Original Price", "Paid Amount", "Paid Status", "Phone (Alt)", "Phone", "Price", "Primary Billing Address", "Primary Shipping Address", "Private Note", "Quantity", "Recalculate order", "Reference", "Remove address", "Remove", "Sale Amount Off", "Sale Price", "Save and continue editing", "Save and return to all orders", "Search customer…", "Search…", "Search or enter customer email…", "Select address", "Send Email", "shipping address", "Shipping Address", "Shipping Method", "Shipping", "Short Number", "SKU", "Snapshot", "Snapshots", "Sorry, no matching options.", "State", "Status", "Tax", "There are errors on the order", "Title", "Total Price", "Total", "Type", "Unit Price", "Update order", "You are not allowed to add a line item.", "Your order is empty", "Zip Code", "{amount} included", ]) %} {% hook "cp.commerce.order.edit" %} {% block mainFormAttributes %}id="main-form" method="post" accept-charset="UTF-8" data-confirm-unload novalidate{% endblock %} {% block actionButton %} {{ redirectInput('commerce/orders/'~order.id) }}
{% endblock %} {% block details %}
{# Give plugins a chance to add other things here #} {% hook "cp.commerce.order.edit.details" %} {% endblock %} {% block content %}
{% hook "cp.commerce.order.edit.main-pane" %}
{{ staticFieldsHtml|raw }} {{ dynamicFieldsHtml|raw }}
{% include 'commerce/orders/_transactions' %} {% include 'commerce/orders/_history' %} {% endblock %} {% js %} window.countries = {{ craft.commerce.countries.allEnabledCountries|values|json_encode|raw }}; window.states = {{ craft.commerce.states.allEnabledStates|values|json_encode|raw }}; $(document).ready(function () { {% if paymentForm is defined and paymentForm %} new Craft.Commerce.OrderEdit({ orderId: {{ orderId|e('js') }}, paymentForm: { errors: {{ paymentForm.errors|json_encode|raw }}, attributes: {{ paymentForm.attributes|json_encode|raw }} } }); {% endif %} $.each($('.tableRowInfo'), function () { new Craft.Commerce.TableRowAdditionalInfoIcon(this); }); }); {% endjs %} {% do view.registerAssetBundle("craft\\web\\assets\\prismjs\\PrismJsAsset") %}