0

I want to make it so that when any User buys a product, when checkout is clicked on then the first modal dialog box opens to either login or use a guest account to purchase the product.

0

Edit: Checkout the Code below or in the attached link Link: magento/magento2/blob/487f5f45/app/code/Magento/Checkout/view/frontend/web/js/sidebar.js#L52-L66

Code: events['click ' + this.options.button.checkout] = $.proxy(function () { var cart = customerData.get('cart'), customer = customerData.get('customer');

if (!customer().firstname && cart().isGuestCheckoutAllowed) {
    if (this.options.url.isRedirectRequired) {
        location.href = this.options.url.loginUrl;
    } else {
        authenticationPopup.showModal();
    }

    return false;
}
location.href = this.options.url.checkout;
}, this);

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.