-1

I want to remove the default page loader when the page is loading. I have to remove checkout loader from

/vendor/magento/module-checkout/view/frontend/templates/onepage.phtml

But still, loader coming.

  • Did you checked this file ? vendor/magento/module-captcha/view/frontend/templates/default.phtml – Kishan Savaliya Nov 11 at 12:56
  • 1
    yes but captcha is disable at the moment – Rutvee Sojitra Nov 11 at 12:57
  • check file module-ui\view\base\web\js\block-loader.js – Ketan Borada Nov 14 at 6:37
-1

overwrite of onepage.phtml in one of your themes or modules.

<div id="checkout-loader" data-role="checkout-loader" class="loading-mask" data-mage-init='{"checkoutLoader": {}}'>

change to :

<div id="checkout-loader" data-role="checkout-loader" class="loading-mask">
  • please read question carefully – Rutvee Sojitra Nov 12 at 4:58
  • Your question is unclear to what's your issue – manoj pal Nov 14 at 14:25
-1

Open /vendor/magento/module-checkout/view/frontend/templates/onepage.phtml file and comment loader code.

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/** @var $block \Magento\Checkout\Block\Onepage */
?>
<div id="checkout" data-bind="scope:'checkout'" class="checkout-container">
    <!-- <div id="checkout-loader" data-role="checkout-loader" class="loading-mask" data-mage-init='{"checkoutLoader": {}}'>
        <div class="loader">
            <img src="<?= $block->escapeUrl($block->getViewFileUrl('images/loader-1.gif')) ?>"
                 alt="<?= $block->escapeHtmlAttr(__('Loading...')) ?>"
                 style="position: absolute;">
        </div>
    </div> -->
    <!-- ko template: getTemplate() --><!-- /ko -->
    <script type="text/x-magento-init">
        {
            "#checkout": {
                "Magento_Ui/js/core/app": <?= /* @noEscape */ $block->getJsLayout() ?>
            }
        }
    </script>
    <script>
        window.checkoutConfig = <?= /* @noEscape */ $block->getSerializedCheckoutConfig() ?>;
        // Create aliases for customer.js model from customer module
        window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
        window.customerData = window.checkoutConfig.customerData;
    </script>
    <script>
        require([
            'mage/url',
            'Magento_Ui/js/block-loader'
        ], function(url, blockLoader) {
            blockLoader("<?= $block->escapeJs($block->escapeUrl($block->getViewFileUrl('images/loader-1.gif'))) ?>");
            return url.setBaseUrl('<?= $block->escapeJs($block->escapeUrl($block->getBaseUrl())) ?>');
        })
    </script>
</div>

Clear cache: php bin/magento cache:clean. And check it.

  • why you people don't read question carefully. I have written in bold that i have already remove loader from onepage.phtml – Rutvee Sojitra Nov 12 at 7:38
  • Clear cache and check it. – Dhaduk Mitesh Nov 12 at 8:34
  • Any why you vote down????? – Dhaduk Mitesh Nov 12 at 8:34

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.