This commit is contained in:
2026-09-15 10:35:56 +08:00
commit 782f8ea7aa
4086 changed files with 631288 additions and 0 deletions
@@ -0,0 +1,171 @@
& when (@media-common = true) {
.block-minicart {
.subtotal {
margin: 0;
}
}
// Keep every checkout address action visually identical to the actual
// mini cart discount Apply button. The dedicated class is also used
// by the popup buttons, which live outside the Amasty step container.
.checkout-index-index .esun-checkout-address-action {
background-image: none;
background: #18aa59;
border: 1px solid #18aa59;
border-radius: 20px;
box-shadow: none;
box-sizing: border-box;
color: #fff;
cursor: pointer;
align-items: center;
display: flex;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 13px;
font-weight: 700;
height: 40px;
justify-content: center;
line-height: 22.4px;
margin: 0;
min-height: auto;
min-width: 82px;
padding: 0 20px;
vertical-align: middle;
}
.checkout-index-index .esun-checkout-address-action:hover {
background: #148f4b;
border-color: #148f4b;
color: #fff;
}
.checkout-index-index .esun-checkout-address-action:focus,
.checkout-index-index .esun-checkout-address-action:active {
background: #148f4b;
border-color: #148f4b;
color: #fff;
}
// Magento turns the billing Cancel action back into a small blue link
// using a more specific checkout selector. Keep it identical to Update.
.checkout-index-index .checkout-payment-method .checkout-billing-address
.actions-toolbar > .primary {
align-items: center;
display: flex;
flex-direction: row-reverse;
gap: 20px;
}
.checkout-index-index .checkout-payment-method .checkout-billing-address
.actions-toolbar .action.action-cancel.esun-checkout-address-action {
background: #18aa59;
border: 1px solid #18aa59;
border-radius: 20px;
color: #fff;
display: flex;
font-size: 13px;
font-weight: 700;
height: 40px;
line-height: 22.4px;
margin: 0;
min-width: 82px;
padding: 0 20px;
text-decoration: none;
}
.checkout-index-index .checkout-payment-method .checkout-billing-address
.actions-toolbar .action.action-cancel.esun-checkout-address-action:hover,
.checkout-index-index .checkout-payment-method .checkout-billing-address
.actions-toolbar .action.action-cancel.esun-checkout-address-action:focus,
.checkout-index-index .checkout-payment-method .checkout-billing-address
.actions-toolbar .action.action-cancel.esun-checkout-address-action:active {
background: #148f4b;
border-color: #148f4b;
color: #fff;
text-decoration: none;
}
// Shipping and billing both render the customer-address EAV fields in a
// single fieldset. These markers make the continuous form structure
// explicit and prevent third-party legend/fieldset grouping from leaking
// into either new-address form.
.checkout-index-index .esun-checkout-address-form {
// Amasty can leave the US region select wrapper with an inline
// display:none after resolving the default country. The address-book
// form shows State/Province, so checkout must expose the same field.
.field:has(select[name='region_id']) {
display: block !important;
}
.fieldset.address {
border: 0;
margin-bottom: 0;
padding: 0;
}
.fieldset.address > .legend {
display: none;
}
}
.checkout-index-index .opc-wrapper .form-discount {
max-width: none;
}
.checkout-index-index button.action.primary.checkout[data-role='review-save'] {
background-color: #18a957 !important;
border-color: #18a957;
border-radius: 30px;
padding-left: 30px;
padding-right: 30px;
}
.checkout-index-index .amcheckout-main-container.-modern
.amcheckout-column.-main > .amcheckout-step-container:nth-child(-n+3),
.checkout-index-index .amcheckout-main-container.-modern
.amcheckout-step-container:has(.amcheckout-shipping-address),
.checkout-index-index .amcheckout-main-container.-modern
.amcheckout-step-container:has(.amcheckout-shipping-methods),
.checkout-index-index .amcheckout-main-container.-modern
.amcheckout-step-container:has(.amcheckout-payment-methods) {
border: 1px solid #e4f5eb !important;
}
.checkout-index-index .amcheckout-main-container.-modern
.amcheckout-step-container.-summary,
.checkout-index-index .amcheckout-main-container.-modern
.amcheckout-step-container.-summary
.amcheckout-summary-container {
border: 0 !important;
box-shadow: none !important;
}
.checkout-index-index .amcheckout-main-container.-modern
.amcheckout-column.-main > .amcheckout-step-container:nth-child(-n+3)
.amcheckout-title,
.checkout-index-index .amcheckout-shipping-address
> .amcheckout-title-container .amcheckout-title,
.checkout-index-index .checkout-shipping-method
.amcheckout-title-container > .amcheckout-title,
.checkout-index-index .amcheckout-payment-methods
.amcheckout-title-container .step-title,
.checkout-index-index .amcheckout-summary-container > .amcheckout-title {
font-size: 2.3rem !important;
}
}
@media (min-width: 768px) {
// The stock desktop field layout gives labels only 25.8% of the modal
// width, which wraps Telephone, Street Address and Zip/Postal Code.
.checkout-index-index .new-shipping-address-modal .esun-checkout-address-form {
.fieldset > .field:not(.choice) > .label {
box-sizing: border-box;
min-width: 32%;
white-space: nowrap;
width: 32%;
}
.fieldset > .field:not(.choice) > .control {
width: 68%;
}
}
}
@@ -0,0 +1,21 @@
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<div class="actions-toolbar">
<div class="primary">
<button class="action action-apply action-update esun-checkout-address-action"
type="button"
click="updateAddress">
<span translate="'Update'"></span>
</button>
<button class="action action-apply action-cancel esun-checkout-address-action"
type="button"
click="cancelAddressEdit"
visible="canUseCancelBillingAddress()">
<span translate="'Cancel'"></span>
</button>
</div>
</div>
@@ -0,0 +1,21 @@
<div class="billing-address-form esun-checkout-address-form">
<!-- ko foreach: getRegion('before-fields') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<form data-bind="attr: {'data-hasrequired': $t('* Required Fields')}">
<fieldset class="fieldset address" data-form="billing-new-address">
<!-- ko foreach: getRegion('additional-fieldsets') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<!-- ko if: (isCustomerLoggedIn && customerHasAddresses) -->
<div class="choice field">
<input type="checkbox" class="checkbox"
data-bind="checked: saveInAddressBook, attr: {id: 'billing-save-in-address-book-' + getCode($parent)}" />
<label class="label" data-bind="attr: {for: 'billing-save-in-address-book-' + getCode($parent)}">
<span data-bind="i18n: 'Save in address book'"></span>
</label>
</div>
<!-- /ko -->
</fieldset>
</form>
</div>
@@ -0,0 +1,30 @@
<div class="shipping-address-item" css="'selected-item' : isSelected() , 'not-selected-item':!isSelected()">
<text args="address().prefix"></text> <text args="address().firstname"></text> <text args="address().middlename"></text>
<text args="address().lastname"></text> <text args="address().suffix"></text><br>
<if args="address().company">
<text args="address().company"></text><br>
</if>
<text args="_.values(_.compact(address().street)).join(', ')"></text><br>
<text args="address().city "></text>, <span text="address().region"></span> <text args="address().postcode"></text><br>
<text args="getCountryName(address().countryId)"></text><br>
<a if="address().telephone" attr="'href': 'tel:' + address().telephone" text="address().telephone"></a><br>
<if args="address().vatId">
<translate args="'VAT'"></translate>: <text args="address().vatId"></text><br>
</if>
<each args="data: address().customAttributes, as: 'element'">
<text args="$parent.getCustomAttributeLabel(element)"></text>
<br>
</each>
<button visible="address().isEditable()" type="button"
class="action edit-address-link"
click="editAddress">
<span translate="'Edit'"></span>
</button>
<if args="!isSelected()">
<button type="button" click="selectAddress"
class="action action-apply action-select-shipping-item esun-checkout-address-action">
<span translate="'Ship Here'"></span>
</button>
</if>
</div>
@@ -0,0 +1,20 @@
<form class="form form-shipping-address esun-checkout-address-form"
id="co-shipping-form"
data-bind="attr: {'data-hasrequired': $t('* Required Fields')}">
<!-- ko foreach: getRegion('before-fields') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<div id="shipping-new-address-form" class="fieldset address">
<!-- ko foreach: getRegion('additional-fieldsets') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<!-- ko if: (isCustomerLoggedIn) -->
<div class="field choice" data-bind="visible: !isFormInline">
<input type="checkbox" class="checkbox" id="shipping-save-in-address-book" data-bind="checked: saveInAddressBook" />
<label class="label" for="shipping-save-in-address-book">
<span data-bind="i18n: 'Save in address book'"></span>
</label>
</div>
<!-- /ko -->
</div>
</form>
@@ -0,0 +1,49 @@
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<!-- ko foreach: getRegion('before_details') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->
<div class="product-item-details">
<div class="product-item-inner">
<div class="product-item-name-block">
<strong class="product-item-name" data-bind="html: getNameUnsanitizedHtml($parent)"></strong>
<div class="details-qty">
<span class="label"><!-- ko i18n: 'Qty' --><!-- /ko --></span>
<span class="value" data-bind="text: $parent.qty.toLocaleString(window.LOCALE)"></span>
</div>
</div>
<!-- ko foreach: getRegion('after_details') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->
</div>
<!-- ko if: (JSON.parse($parent.options).length > 0)-->
<div class="product options">
<strong class="subtitle"><!-- ko i18n: 'Options Details' --><!-- /ko --></strong>
<dl class="item-options">
<!--ko foreach: JSON.parse($parent.options)-->
<dt class="label" data-bind="text: label"></dt>
<!-- ko if: ($data.full_view)-->
<!-- ko with: {full_viewUnsanitizedHtml: $data.full_view}-->
<dd class="values" data-bind="html: full_viewUnsanitizedHtml"></dd>
<!-- /ko -->
<!-- /ko -->
<!-- ko ifnot: ($data.full_view)-->
<!-- ko with: {valueUnsanitizedHtml: $data.value}-->
<dd class="values" data-bind="html: valueUnsanitizedHtml"></dd>
<!-- /ko -->
<!-- /ko -->
<!-- /ko -->
</dl>
</div>
<!-- /ko -->
</div>
<!-- ko foreach: getRegion('item_message') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->