0

I want to show a message on the checkout place order button click for a few seconds before the place order event. Is this possible?

1 Answer 1

0

Yes. possible. Need to override Place order js

Magento_Checkout/js/action/place-order).

requirejs-config.js

    var config = {
        config: {
            mixins: {
                'Magento_Checkout/js/action/place-order': {
                    'My_Module/js/action/place-order': true
                }
            }
        }
    };
place-order.js
    define(['mage/utils/wrapper'], function (wrapper) {
        'use strict';
    
        return function (placeOrderAction) {
            return wrapper.wrap(placeOrderAction, function (originalAction, paymentData, redirectOnSuccess) {
                // my own code here
                return originalAction(paymentData, redirectOnSuccess);
            });
        };
    });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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