Commit 3db273ad by dhn

发票地址位置及功能修改

parent 0d843a60
......@@ -197,8 +197,27 @@ class LayoutProcessor implements LayoutProcessorInterface
$fields
);
}
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
if (isset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['after-shipping-method-form'])){
$component['billing-address-form'] = $this->getBillingAddressComponent('shared', $elements);
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['after-shipping-method-form']['children'] =
array_merge_recursive(
$component,
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
['children']['shippingAddress']['children']['after-shipping-method-form']
);
}
$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
['shippingAddress']['children']['shipping-address-fieldset']['children']['company']['sortOrder'] = 140;
file_put_contents('./yyyy.txt',json_encode($jsLayout));
return $jsLayout;
}
......
......@@ -229,6 +229,13 @@
</item>
</item>
</item>
<item name="after-shipping-method-form" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="displayArea" xsi:type="string">after-shipping-method-form</item>
<item name="children" xsi:type="array">
<!-- address-list-additional-addresses -->
</item>
</item>
</item>
</item>
</item>
......
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @api
*/
define(
[
'jquery',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/url-builder',
'mage/storage-new',
'Magento_Checkout/js/model/error-processor',
'Magento_Customer/js/model/customer',
'Magento_Checkout/js/model/full-screen-loader',
'Magento_Checkout/js/action/get-payment-information'
],
function ($,
quote,
urlBuilder,
storage,
errorProcessor,
customer,
fullScreenLoader,
getPaymentInformationAction
) {
'use strict';
return function (messageContainer) {
var serviceUrl,
payload;
/**
* Checkout for guest and registered customer.
*/
if (!customer.isLoggedIn()) {
serviceUrl = urlBuilder.createUrl('/guest-carts/:cartId/billing-address', {
cartId: quote.getQuoteId()
});
payload = {
cartId: quote.getQuoteId(),
address: quote.billingAddress()
};
} else {
serviceUrl = urlBuilder.createUrl('/carts/mine/billing-address', {});
payload = {
cartId: quote.getQuoteId(),
address: quote.billingAddress()
};
}
fullScreenLoader.startLoader();
quote.responseBillStatus(null);
return storage.post(
serviceUrl, JSON.stringify(payload)
).done(
function () {
var deferred = $.Deferred();
getPaymentInformationAction(deferred);
$.when(deferred).done(function () {
fullScreenLoader.stopLoader();
});
quote.responseBillStatus(200);
}
).fail(
function (response) {
errorProcessor.process(response, messageContainer);
fullScreenLoader.stopLoader();
quote.responseBillStatus(400);
}
);
};
}
);
......@@ -32,6 +32,7 @@ define([
shippingSaveMethod = ko.observable(null),
paymentMethod = ko.observable(null),
paymentMethodlist = ko.observable(null),
responseBillStatus = ko.observable(null),
quoteData = window.checkoutConfig.quoteData,
basePriceFormat = window.checkoutConfig.basePriceFormat,
priceFormat = window.checkoutConfig.priceFormat,
......@@ -45,6 +46,7 @@ define([
shippingAddress: shippingAddress,
shippingMethod: shippingMethod,
shippingSaveMethod:shippingSaveMethod,
responseBillStatus:responseBillStatus,
billingAddress: billingAddress,
paymentMethod: paymentMethod,
paymentMethodlist:paymentMethodlist,
......@@ -121,7 +123,6 @@ define([
getShippingSaveMethod: function () {
return shippingSaveMethod;
},
setPaymentMethodList: function (MethodList) {
paymentMethodlist(MethodList);
},
......
......@@ -4,315 +4,322 @@
*/
define([
'ko',
'underscore',
'Magento_Ui/js/form/form',
'Magento_Customer/js/model/customer',
'Magento_Customer/js/model/address-list',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/action/create-billing-address',
'Magento_Checkout/js/action/select-billing-address',
'Magento_Checkout/js/checkout-data',
'Magento_Checkout/js/model/checkout-data-resolver',
'Magento_Customer/js/customer-data',
'Magento_Checkout/js/action/set-billing-address',
'Magento_Ui/js/model/messageList',
'mage/translate',
'Magento_Checkout/js/model/billing-address-postcode-validator',
'Magento_Checkout/js/model/address-converter'
],
function (
ko,
_,
Component,
customer,
addressList,
quote,
createBillingAddress,
selectBillingAddress,
checkoutData,
checkoutDataResolver,
customerData,
setBillingAddressAction,
globalMessageList,
$t,
billingAddressPostcodeValidator,
addressConverter
) {
'use strict';
var lastSelectedBillingAddress = null,
addressUpadated = false,
addressEdited = false,
countryData = customerData.get('directory-data'),
addressOptions = addressList().filter(function (address) {
return address.getType() === 'customer-address';
});
return Component.extend({
defaults: {
template: 'Magento_Checkout/new-billing-address',
actionsTemplate: 'Magento_Checkout/billing-address/actions',
formTemplate: 'Magento_Checkout/billing-address/form',
//detailsTemplate: 'Magento_Checkout/billing-address/details',
links: {
isAddressFormVisible: '${$.billingAddressListProvider}:isNewAddressSelected'
}
},
currentBillingAddress: quote.billingAddress,
customerHasAddresses: addressOptions.length > 0,
addressOptions: addressOptions,
/**
* Init component
*/
initialize: function () {
this._super();
quote.paymentMethod.subscribe(function () {
checkoutDataResolver.resolveBillingAddress();
}, this);
billingAddressPostcodeValidator.initFields(this.get('name') + '.form-fields');
},
/**
* @return {exports.initObservable}
*/
initObservable: function () {
this._super()
.observe({
selectedAddress: null,
isAddressDetailsVisible: quote.billingAddress() != null,
isAddressFormVisible: !customer.isLoggedIn() || !addressOptions.length,
isAddressSameAsShipping: false,
saveInAddressBook: 1
});
quote.billingAddress.subscribe(function (newAddress) {
if (quote.isVirtual()) {
this.isAddressSameAsShipping(false);
} else {
this.isAddressSameAsShipping(
newAddress != null &&
newAddress.getCacheKey() == quote.shippingAddress().getCacheKey() //eslint-disable-line eqeqeq
);
'ko',
'underscore',
'Magento_Ui/js/form/form',
'Magento_Customer/js/model/customer',
'Magento_Customer/js/model/address-list',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/action/create-billing-address',
'Magento_Checkout/js/action/select-billing-address',
'Magento_Checkout/js/checkout-data',
'Magento_Checkout/js/model/checkout-data-resolver',
'Magento_Customer/js/customer-data',
'Magento_Checkout/js/action/set-billing-address-new',
'Magento_Ui/js/model/messageList',
'mage/translate',
'Magento_Checkout/js/model/billing-address-postcode-validator',
'Magento_Checkout/js/model/address-converter'
],
function (
ko,
_,
Component,
customer,
addressList,
quote,
createBillingAddress,
selectBillingAddress,
checkoutData,
checkoutDataResolver,
customerData,
setBillingAddressAction,
globalMessageList,
$t,
billingAddressPostcodeValidator,
addressConverter
) {
'use strict';
var lastSelectedBillingAddress = null,
setCurrentBillingAddress = null,
addressUpadated = false,
addressEdited = false,
countryData = customerData.get('directory-data'),
addressOptions = addressList().filter(function (address) {
return address.getType() === 'customer-address';
});
return Component.extend({
defaults: {
template: 'Magento_Checkout/new-billing-address',
actionsTemplate: 'Magento_Checkout/billing-address/actions',
formTemplate: 'Magento_Checkout/billing-address/form',
//detailsTemplate: 'Magento_Checkout/billing-address/details',
links: {
isAddressFormVisible: '${$.billingAddressListProvider}:isNewAddressSelected'
}
if (newAddress != null && newAddress.saveInAddressBook !== undefined) {
this.saveInAddressBook(newAddress.saveInAddressBook);
},
//currentBillingAddress: quote.billingAddress,
customerHasAddresses: addressOptions.length > 0,
addressOptions: addressOptions,
/**
* Init component
*/
initialize: function () {
this._super();
quote.paymentMethod.subscribe(function () {
checkoutDataResolver.resolveBillingAddress();
}, this);
billingAddressPostcodeValidator.initFields(this.get('name') + '.form-fields');
},
/**
* @return {exports.initObservable}
*/
initObservable: function () {
this._super()
.observe({
selectedAddress: null,
isAddressDetailsVisible: quote.billingAddress() != null,
isAddressFormVisible: !customer.isLoggedIn() || !addressOptions.length,
isAddressSameAsShipping: true,
saveInAddressBook: 1
});
quote.billingAddress.subscribe(function (newAddress) {
if (newAddress != null && newAddress.saveInAddressBook !== undefined) {
this.saveInAddressBook(newAddress.saveInAddressBook);
} else {
this.saveInAddressBook(1);
}
setCurrentBillingAddress = quote.billingAddress();
this.isAddressDetailsVisible(true);
}, this);
return this;
},
canUseShippingAddress: ko.computed(function () {
return !quote.isVirtual() && quote.shippingAddress() && quote.shippingAddress().canUseForBilling();
}),
/**
* @param {Object} address
* @return {*}
*/
addressOptionsText: function (address) {
return address.getAddressInline();
},
currentBillingAddress:function(){
return setCurrentBillingAddress;
},
/**
* @return {Boolean}
*/
useShippingAddress: function () {
if (this.isAddressSameAsShipping()) {
selectBillingAddress(quote.shippingAddress());
this.updateAddresses();
this.isAddressDetailsVisible(true);
} else {
this.saveInAddressBook(1);
lastSelectedBillingAddress = quote.billingAddress();
quote.billingAddress(null);
this.isAddressDetailsVisible(false);
}
this.isAddressDetailsVisible(true);
}, this);
return this;
},
canUseShippingAddress: ko.computed(function () {
return !quote.isVirtual() && quote.shippingAddress() && quote.shippingAddress().canUseForBilling();
}),
/**
* @param {Object} address
* @return {*}
*/
addressOptionsText: function (address) {
return address.getAddressInline();
},
/**
* @return {Boolean}
*/
useShippingAddress: function () {
if (this.isAddressSameAsShipping()) {
selectBillingAddress(quote.shippingAddress());
checkoutData.setSelectedBillingAddress(null);
this.updateAddresses();
this.isAddressDetailsVisible(true);
} else {
lastSelectedBillingAddress = quote.billingAddress();
quote.billingAddress(null);
this.isAddressDetailsVisible(false);
}
checkoutData.setSelectedBillingAddress(null);
return true;
},
return true;
},
/**
* Update address action
*/
updateAddress: function () {
var addressData, newBillingAddress;
/**
* Update address action
*/
updateAddress: function () {
var addressData, newBillingAddress;
addressUpadated = true;
addressUpadated = true;
if (this.selectedAddress() && !this.isAddressFormVisible()) {
selectBillingAddress(this.selectedAddress());
checkoutData.setSelectedBillingAddress(this.selectedAddress().getKey());
} else {
this.source.set('params.invalid', false);
this.source.trigger(this.dataScopePrefix + '.data.validate');
if (this.selectedAddress() && !this.isAddressFormVisible()) {
selectBillingAddress(this.selectedAddress());
checkoutData.setSelectedBillingAddress(this.selectedAddress().getKey());
} else {
this.source.set('params.invalid', false);
this.source.trigger(this.dataScopePrefix + '.data.validate');
if (this.source.get(this.dataScopePrefix + '.custom_attributes')) {
this.source.trigger(this.dataScopePrefix + '.custom_attributes.data.validate');
}
if (this.source.get(this.dataScopePrefix + '.custom_attributes')) {
this.source.trigger(this.dataScopePrefix + '.custom_attributes.data.validate');
if (!this.source.get('params.invalid')) {
addressData = this.source.get(this.dataScopePrefix);
if (customer.isLoggedIn() && !this.customerHasAddresses) { //eslint-disable-line max-depth
this.saveInAddressBook(1);
}
addressData['save_in_address_book'] = this.saveInAddressBook() ? 1 : 0;
newBillingAddress = createBillingAddress(addressData);
// New address must be selected as a billing address
selectBillingAddress(newBillingAddress);
setCurrentBillingAddress = newBillingAddress;
checkoutData.setSelectedBillingAddress(newBillingAddress.getKey());
checkoutData.setNewCustomerBillingAddress(addressData);
}
}
var data = setBillingAddressAction(globalMessageList);
if(data.status == 200)
{
this.isAddressDetailsVisible(true);
}
else
{
this.isAddressDetailsVisible(false);
}
if (!this.source.get('params.invalid')) {
addressData = this.source.get(this.dataScopePrefix);
this.updateAddresses();
if (customer.isLoggedIn() && !this.customerHasAddresses) { //eslint-disable-line max-depth
this.saveInAddressBook(1);
}
addressData['save_in_address_book'] = this.saveInAddressBook() ? 1 : 0;
newBillingAddress = createBillingAddress(addressData);
// New address must be selected as a billing address
selectBillingAddress(newBillingAddress);
checkoutData.setSelectedBillingAddress(newBillingAddress.getKey());
checkoutData.setNewCustomerBillingAddress(addressData);
}
}
setBillingAddressAction(globalMessageList);
this.updateAddresses();
},
/**
* Edit address action
*/
editAddress: function () {
addressUpadated = false;
addressEdited = true;
lastSelectedBillingAddress = quote.billingAddress();
quote.billingAddress(null);
this.isAddressDetailsVisible(false);
},
/**
* Cancel address edit action
*/
cancelAddressEdit: function () {
addressUpadated = true;
this.restoreBillingAddress();
if (quote.billingAddress()) {
// restore 'Same As Shipping' checkbox state
this.isAddressSameAsShipping(
quote.billingAddress() != null &&
},
/**
* Edit address action
*/
editAddress: function () {
addressUpadated = false;
addressEdited = true;
lastSelectedBillingAddress = quote.billingAddress();
quote.billingAddress(null);
this.isAddressDetailsVisible(false);
},
/**
* Cancel address edit action
*/
cancelAddressEdit: function () {
addressUpadated = true;
this.restoreBillingAddress();
if (quote.billingAddress()) {
// restore 'Same As Shipping' checkbox state
this.isAddressSameAsShipping(
quote.billingAddress() != null &&
quote.billingAddress().getCacheKey() == quote.shippingAddress().getCacheKey() && //eslint-disable-line
!quote.isVirtual()
);
this.isAddressDetailsVisible(true);
}
},
/**
* Manage cancel button visibility
*/
canUseCancelBillingAddress: ko.computed(function () {
return quote.billingAddress() || lastSelectedBillingAddress;
}),
/**
* Check if Billing Address Changes should be canceled
*/
needCancelBillingAddressChanges: function () {
if (addressEdited && !addressUpadated) {
this.cancelAddressEdit();
}
},
);
this.isAddressDetailsVisible(true);
}
},
/**
* Manage cancel button visibility
*/
canUseCancelBillingAddress: ko.computed(function () {
return quote.billingAddress() || lastSelectedBillingAddress;
}),
/**
* Check if Billing Address Changes should be canceled
*/
needCancelBillingAddressChanges: function () {
if (addressEdited && !addressUpadated) {
this.cancelAddressEdit();
}
},
/**
* Restore billing address
*/
restoreBillingAddress: function () {
var lastBillingAddress;
/**
* Restore billing address
*/
restoreBillingAddress: function () {
var lastBillingAddress;
if (lastSelectedBillingAddress != null) {
selectBillingAddress(lastSelectedBillingAddress);
lastBillingAddress = addressConverter.quoteAddressToFormAddressData(lastSelectedBillingAddress);
if (lastSelectedBillingAddress != null) {
selectBillingAddress(lastSelectedBillingAddress);
lastBillingAddress = addressConverter.quoteAddressToFormAddressData(lastSelectedBillingAddress);
checkoutData.setNewCustomerBillingAddress(lastBillingAddress);
}
},
/**
* @param {Number} countryId
* @return {*}
*/
getCountryName: function (countryId) {
return countryData()[countryId] != undefined ? countryData()[countryId].name : ''; //eslint-disable-line
},
/**
* Trigger action to update shipping and billing addresses
*/
updateAddresses: function () {
if (window.checkoutConfig.reloadOnBillingAddress ||
!window.checkoutConfig.displayBillingOnPaymentMethod
) {
setBillingAddressAction(globalMessageList);
}
},
/**
* Get code
* @param {Object} parent
* @returns {String}
*/
getCode: function (parent) {
return _.isFunction(parent.getCode) ? parent.getCode() : 'shared';
},
/**
* Get customer attribute label
*
* @param {*} attribute
* @returns {*}
*/
getCustomAttributeLabel: function (attribute) {
var label;
if (typeof attribute === 'string') {
return attribute;
}
checkoutData.setNewCustomerBillingAddress(lastBillingAddress);
}
},
/**
* @param {Number} countryId
* @return {*}
*/
getCountryName: function (countryId) {
return countryData()[countryId] != undefined ? countryData()[countryId].name : ''; //eslint-disable-line
},
/**
* Trigger action to update shipping and billing addresses
*/
updateAddresses: function () {
if (window.checkoutConfig.reloadOnBillingAddress ||
!window.checkoutConfig.displayBillingOnPaymentMethod
) {
setBillingAddressAction(globalMessageList);
}
},
/**
* Get code
* @param {Object} parent
* @returns {String}
*/
getCode: function (parent) {
return _.isFunction(parent.getCode) ? parent.getCode() : 'shared';
},
/**
* Get customer attribute label
*
* @param {*} attribute
* @returns {*}
*/
getCustomAttributeLabel: function (attribute) {
var label;
if (typeof attribute === 'string') {
return attribute;
}
if (attribute.label) {
return attribute.label;
}
if (attribute.label) {
return attribute.label;
}
if (_.isArray(attribute.value)) {
label = _.map(attribute.value, function (value) {
return this.getCustomAttributeOptionLabel(attribute['attribute_code'], value) || value;
}, this).join(', ');
} else {
label = this.getCustomAttributeOptionLabel(attribute['attribute_code'], attribute.value);
}
if (_.isArray(attribute.value)) {
label = _.map(attribute.value, function (value) {
return this.getCustomAttributeOptionLabel(attribute['attribute_code'], value) || value;
}, this).join(', ');
} else {
label = this.getCustomAttributeOptionLabel(attribute['attribute_code'], attribute.value);
}
return label || attribute.value;
},
/**
* Get option label for given attribute code and option ID
*
* @param {String} attributeCode
* @param {String} value
* @returns {String|null}
*/
getCustomAttributeOptionLabel: function (attributeCode, value) {
var option,
label,
options = this.source.get('customAttributes') || {};
if (options[attributeCode]) {
option = _.findWhere(options[attributeCode], {
value: value
});
if (option) {
label = option.label;
return label || attribute.value;
},
/**
* Get option label for given attribute code and option ID
*
* @param {String} attributeCode
* @param {String} value
* @returns {String|null}
*/
getCustomAttributeOptionLabel: function (attributeCode, value) {
var option,
label,
options = this.source.get('customAttributes') || {};
if (options[attributeCode]) {
option = _.findWhere(options[attributeCode], {
value: value
});
if (option) {
label = option.label;
}
}
}
return label;
}
return label;
}
});
});
});
define([
'jquery',
'uiComponent',
'Magento_Checkout/js/model/checkout-data-resolver'
], function ($, Component,checkoutDataResolver) {
'uiRegistry',
'Magento_Checkout/js/model/checkout-data-resolver',
'Magento_Checkout/js/model/quote'
], function ($, Component,registry,checkoutDataResolver,quote) {
'use strict';
var input_city = $('#co-shipping-form input[name="city"]');
if (input_city.is(':visible') && !input_city.closest('.field').hasClass('_required')) {
......@@ -39,6 +41,9 @@ define([
if (!addressForm.validate().form()) {
return false;
}
var paymentMethodObj = $('.checkout-index-index .payment-method');
if(paymentMethodObj.length < 1)
{
......@@ -58,12 +63,22 @@ define([
} else {
regin = region_select.find(":selected").text();
}
if(!registry.get('checkout.steps.shipping-step.shippingAddress.after-shipping-method-form.billing-address-form').isAddressSameAsShipping())
{
$('#submitBill').trigger('click');
if(quote.responseBillStatus() == 400)
{
return false;
}
}
$('#checkout-step-shipping').hide();
$('#shipping-text').show();
$('#shipping-text .main-address.shipping-address').html(firstname + ' ' + lastname + '<br>' + street + '<br>' + city + ', ' + regin + ', ' + country + '<br>' + postcode + ', ' + telephone + '<br>' + email);
}
$(paymentMethodObj[0]).find('input[type="radio"]').trigger('click');
$('#next-shipping').hide();
$('#edit-shipping').show();
$('#checkout-step-shipping_method').show();
$('#checkout-payment-method-load').show();
$('#checkout-step-payment,#opc-shipping_method').find('.step-title').removeClass('no-border');
......@@ -80,10 +95,41 @@ define([
$('#shipping-text').hide();
$('#checkout-step-shipping').show();
$('#next-shipping').show();
$('#edit-shipping').hide();
$('#checkout-step-shipping_method').hide();
$('#checkout-payment-method-load').hide();
$('#checkout-step-payment,#opc-shipping_method').find('.step-title').addClass('no-border');
});
$(document).on('click', '#billing-address-same-as-shipping-shared', function () {
if(!registry.get('checkout.steps.shipping-step.shippingAddress.after-shipping-method-form.billing-address-form').isAddressSameAsShipping())
{
$('#shipping-text .main-address.shipping-address').html('');
$('#checkout_place_order').removeClass('button-fix');
$('#shipping-text').hide();
$('#checkout-step-shipping').show();
$('#next-shipping').show();
$('#edit-shipping').hide();
$('#checkout-step-shipping_method').hide();
$('#checkout-payment-method-load').hide();
$('#checkout-step-payment,#opc-shipping_method').find('.step-title').addClass('no-border');
}
});
$(document).on('click', '#editLink', function () {
$('#shipping-text .main-address.shipping-address').html('');
$('#checkout_place_order').removeClass('button-fix');
$('#shipping-text').hide();
$('#checkout-step-shipping').show();
$('#next-shipping').show();
$('#edit-shipping').hide();
$('#checkout-step-shipping_method').hide();
$('#checkout-payment-method-load').hide();
$('#checkout-step-payment,#opc-shipping_method').find('.step-title').addClass('no-border');
if(!registry.get('checkout.steps.shipping-step.shippingAddress.after-shipping-method-form.billing-address-form').isAddressSameAsShipping())
{
$('#action-edit-address').trigger('click');
}
});
}
});
}
......
......@@ -70,8 +70,10 @@ define([
* @returns {*}
*/
_isAddressSameAsShipping: function () {
if(registry.get('checkout.steps.shipping-step.shippingAddress.after-shipping-method-form.billing-address-form')){
return registry.get('checkout.steps.shipping-step.shippingAddress.after-shipping-method-form.billing-address-form').isAddressSameAsShipping();
}
return true;
//return registry.get('checkout.steps.billing-step.payment.payments-list.billing-address-form-shared').isAddressSameAsShipping();
}
});
});
......@@ -21,11 +21,11 @@
<br/>
</each>
</div>
<div class="billing-handle">
<div class="billing-handle" style="display: none;">
<button visible="!isAddressSameAsShipping()"
type="button"
class="action action-edit-address"
click="editAddress">
click="editAddress" id="action-edit-address">
<span translate="'Edit'"></span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M19.769 9.923l-12.642 12.639-7.127 1.438 1.438-7.128 12.641-12.64 5.69 5.691zm1.414-1.414l2.817-2.82-5.691-5.689-2.816 2.817 5.69 5.692z"></path>
......
......@@ -5,15 +5,17 @@
padding: 20px 22px;
border: 1px solid #d6d6d6;
font-size: 14px;
min-height: 200px;
/*min-height: 200px;*/
position: relative;
box-sizing: border-box;
}
/*
.billing-address-box{
padding-bottom: 1rem;
border-bottom: 1px dashed #ddd;
}
*/
.billing-handle .action-edit-address {
border: none;
background: 0 0;
......@@ -30,7 +32,7 @@
fill: #666;
}
.billing-address-details {
padding: 0.5rem 0px 0.5rem 1.5rem;
padding: 0.5rem 0px 0.5rem 0rem;
}
@media (max-width: 1023px){
.action-update-cancel{
......@@ -77,7 +79,7 @@
</style>
<div class="checkout-billing-address cclt">
<div class="billing-address-same-as-shipping-block field choice" data-bind="visible: canUseShippingAddress()">
<div class="billing-address-same-as-shipping-block field choice" data-bind="visible: canUseShippingAddress()" style="padding:0;">
<input type="checkbox" name="billing-address-same-as-shipping"
data-bind="checked: isAddressSameAsShipping, click: useShippingAddress, attr: {id: 'billing-address-same-as-shipping-' + getCode($parent)}"/>
<label data-bind="attr: {for: 'billing-address-same-as-shipping-' + getCode($parent)}"><span
......@@ -91,7 +93,7 @@
<!-- ko template: 'Magento_Checkout/billing-address/form' --><!-- /ko -->
<div class="actions-toolbar action-update-cancel" style="margin-left: 0%;">
<div class="primary">
<button class="action action-update" type="button" data-bind="click: updateAddress">
<button class="action action-update" id="submitBill" type="button" data-bind="click: updateAddress">
<span data-bind="i18n: 'Update'"></span>
</button>
<button class="action action-cancel" type="button" data-bind="click: cancelAddressEdit">
......
......@@ -8,11 +8,6 @@
class="items payment-methods">
<div repeat="foreach: paymentGroupsList, item: '$group'"
class="payment-group">
<!-- ko if: showFormShared($group) -->
<!-- ko foreach: getRegion(getBillingAddressRegionName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<!--/ko-->
<each args="data: getRegion($group().displayArea), as: 'method'" render=""></each>
</div>
</div>
......
......@@ -283,7 +283,7 @@ $full_free_ship = $_helper->currency($full_free, true, false);
padding: 20px 22px;
border: 1px solid #d6d6d6;
font-size: 14px;
min-height: 200px;
/*min-height: 200px;*/
position: relative;
box-sizing: border-box;
}
......@@ -297,11 +297,13 @@ $full_free_ship = $_helper->currency($full_free, true, false);
background-size: contain;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAACECAYAAABVnZHfAAAA+0lEQVQ4je3UsUrDUBTG8X9s6yZOeYMOLejgS7iIUDCrS0uH0oI+QUGdHZSsjnZw6dB3ENK1U8eCQqBjoWvkaE/4SpHgYjv0bj9yc5J7v3tukN5GGT9jcICMreFDEQFLRwK0gCyIXtLvKfGkd5aDwr+uKkbAsaMGvAElf+cc6GuB6m7szo4hU9w5ysA9UNdpTWDsS7BMn3U9mZ3EtdIlxZOiC3T8O6yeTr1axU7JPp8iJIor7zvDJ9CwjLTNwj+02aEiVrSBGyS5R03OEr/e51OEd4UFNXPMgUtgkTdT7zQONzrrd1woXoETh92UQyD0AnaXPmi1o3/ZA+ALpYA1JaK/rAEAAAAASUVORK5CYII=) repeat-y;
}
/*
.main-address.shipping-address
{
border-bottom: 1px dashed #d6d6d6;
padding-bottom: 20px;
}
*/
.address-edit{
border: none;
background: 0 0;
......
......@@ -4,6 +4,15 @@
* See COPYING.txt for license details.
*/
-->
<style>
#edit-shipping{
border-bottom: 1px #dddddd dashed;
text-align: right;
}
#edit-shipping svg{
vertical-align: revert;
}
</style>
<li id="shipping" class="checkout-shipping-address" data-bind="fadeVisible: visible()">
<!--<div class="step-title" translate="'Shipping Address'" data-role="title" />-->
<p class="step-title">
......@@ -14,7 +23,7 @@
</p>
<div id="checkout-step-shipping"
class="step-content"
data-role="content">
data-role="content" style="margin-bottom: 1rem;">
<each if="!quoteIsVirtual" args="getRegion('customer-email')" render="" />
<each args="getRegion('address-list')" render="" />
......@@ -46,17 +55,22 @@
<div class="confirmed-address">
<div class="main-address shipping-address">
</div>
<button class="address-edit">
<span>edit</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M19.769 9.923l-12.642 12.639-7.127 1.438 1.438-7.128 12.641-12.64 5.69 5.691zm1.414-1.414l2.817-2.82-5.691-5.689-2.816 2.817 5.69 5.692z"></path>
</svg>
</button>
</div>
</div>
<div class="billing-address-form">
<each args="getRegion('after-shipping-method-form')" render="" />
</div>
<div id="next-shipping">
<span><!-- ko i18n: 'Save & Continue'--><!-- /ko --></span>
</div>
<div id="edit-shipping" style="display:none;">
<a href="javascript:;" id="editLink" style="color:#000;">
<span><!-- ko i18n: 'Edit'--><!-- /ko --></span>
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24">
<path d="M19.769 9.923l-12.642 12.639-7.127 1.438 1.438-7.128 12.641-12.64 5.69 5.691zm1.414-1.414l2.817-2.82-5.691-5.689-2.816 2.817 5.69 5.692z"></path>
</svg>
</a>
</div>
</li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment