I want to find jquery code and execute order processing when click on place order in checkout page beacuse i logged in and when I select shipping address and switch to payment step and unchecked of same as shipping address in billing and add new billing address and when I click place order button it automatically checked checkobx of 'My billing address as shipping address'.
4 Answers
These two files.
PATH:
html/vendor/magento/module-checkout/view/frontend/web/js/action/place-order.js:12
.
html/vendor/magento/module-checkout/view/frontend/web/js/view/review/actions/default.js:17
PATH :
magento2/pub/static/frontend/Magento/{{THEME}}/en_US/Magento_Checkout/js/action/place-order.js
-
-
-
Where is this skin/frontend/base/default/js/opcheckout.js path in magento 2 ? Jan 4, 2017 at 5:54
-
If you tell me where is located after click place order jquery ajax process data I will accept your answer and up vote for you Jan 4, 2017 at 5:58
-
Here is the place order js , PATH : magento2/pub/static/frontend/Magento/{{THEME}}/en_US/Magento_Checkout/js/action/place-order.js Jan 4, 2017 at 12:13
Click on place order button in checkout page called on the file :
/vendor/magento/module-checkout/view/frontend/web/js/action/place-order.js
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @api
*/
define([
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/url-builder',
'Magento_Customer/js/model/customer',
'Magento_Checkout/js/model/place-order'
], function (quote, urlBuilder, customer, placeOrderService) {
'use strict';
return function (paymentData, messageContainer) {
var serviceUrl, payload;
payload = {
cartId: quote.getQuoteId(),
billingAddress: quote.billingAddress(),
paymentMethod: paymentData
};
if (customer.isLoggedIn()) {
serviceUrl = urlBuilder.createUrl('/carts/mine/payment-information', {});
} else {
serviceUrl = urlBuilder.createUrl('/guest-carts/:quoteId/payment-information', {
quoteId: quote.getQuoteId()
});
payload.email = quote.guestEmail;
}
return placeOrderService(serviceUrl, payload, messageContainer);
};
});
try to add custom code here
/module-checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js