1

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'.

  • not sure, check this code : skin/frontend/{package}/{theme}/js/opcheckout.js – Baby in Magento Jan 3 '17 at 7:42
  • @BabyinMagento I am asking for magento 2 – Niraj Patel Jan 3 '17 at 9:06
1

PATH :

magento2/pub/static/frontend/Magento/{{THEME}}/en_US/Magento‌​_Checkout/js/action/‌​place-order.js

  • He/she is asking for magento 2 not for magento 1 – ND17 Jan 3 '17 at 8:07
  • I am asking magento 2 – Niraj Patel Jan 3 '17 at 9:06
  • Where is this skin/frontend/base/default/js/opcheckout.js path in magento 2 ? – Niraj Patel Jan 4 '17 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 – Niraj Patel Jan 4 '17 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 – prathmeshb1 Jan 4 '17 at 12:13
1

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

1

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);
    };
});
-2

try to add custom code here

/module-checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.