4

I Don't know why Commented code working in magento 2.1.7 I have used reload script for some reason but not required now. so i have commented that code. Even the Checkout page refreshing twice after clicking NEXT button.

If I remove that commented code page won't work. Kindly Help.... I am stuck on this As i am newbie.

    <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="<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>"
                 alt="<?php /* @escapeNotVerified */ echo __('Loading...'); ?>"
                 style="position: absolute;">
        </div>
    </div> 
<!--     <button type="button" onClick="window.location.reload();" rtfdfgfghfghvalue='Check Pincode Availablity'>Click to Check Pincode Availablity</button> -->
    <!-- ko template: getTemplate() --><!-- /ko --> <!-- by satish 24.09.2017 -->
    <script type="text/x-magento-init">
        {   
            "#checkout": {
                "Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?>
            }
        }
    </script>
    <script>
        window.checkoutConfig = <?php /* @escapeNotVerified */ echo \Zend_Json::encode($block->getCheckoutConfig()); ?>;
        // 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("<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>");
            return url.setBaseUrl('<?php /* @escapeNotVerified */ echo $block->getBaseUrl();?>');
        })
    </script>
</div>
13
  • Please share website URL, did you flushed cache and static content deploy after done those changes?
    – kunj
    Jun 9, 2018 at 13:01
  • Yes i done cache flush , static content deploy url is shopkeeperz.com
    – Mahendra
    Jun 9, 2018 at 13:03
  • Did you tried after delete that code?
    – kunj
    Jun 9, 2018 at 13:03
  • yes i removed commented code than checkout page coming blank
    – Mahendra
    Jun 9, 2018 at 13:03
  • When going through buy now button its happening i used plugin of prince from github
    – Mahendra
    Jun 9, 2018 at 13:07

0

Your Answer

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

Browse other questions tagged or ask your own question.