3

After opening the mini cart, everything works correctly in every place on the site.

But we have issue after display mini cart in checkout. (after close mini cart stays still black screen):

here is movie: https://streamable.com/6jd2r

Anyone know how to solve?

edit:

    .onestepcheckout-index-index.ajax-loading .oscheckout-loading {
      display: block !important;
    }
    body._has-modal-custom:before {
      position: fixed;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.8);
      content: "";
      z-index: 150;
    }
    body._has-modal-custom .modal-custom.authentication-dropdown {
      display: block !important;
    }

        body._has-modal-custom._has-auth-shown:before {
          display: none;
        }

body._has-modal-custom .modal-custom.authentication-dropdown {
  display: block !important;
}

in minicart.phtml I cannot find class _has-modal-custom

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

// @codingStandardsIgnoreFile

/** @var $block \Magento\Checkout\Block\Cart\Sidebar */
?>
<?php $themeHelper = $this->helper('MGS\Mpanel\Helper\Data'); ?>
<?php $enbCartDropdown = $themeHelper->getStoreConfig('mgstheme/general/cart_dropdown'); ?>

<div data-block="minicart" class="minicart-wrapper<?php if($enbCartDropdown): ?> minicart-wrapper--dropdown<?php endif ?>">
    <a class="action showcart" href="<?php /* @escapeNotVerified */ echo $block->getShoppingCartUrl(); ?>"
       data-bind="scope: 'minicart_content'">
        <span class="counter qty empty"
              data-bind="css: { empty: !!getCartParam('summary_count') == false }, blockLoader: isLoading">
            <span class="counter-number"><!-- ko text: getCartParam('summary_count') --><!-- /ko --></span>
            <span class="counter-label">
            <!-- ko if: getCartParam('summary_count') -->
                <!-- ko text: getCartParam('summary_count') --><!-- /ko -->
                <!-- ko i18n: 'items' --><!-- /ko -->
            <!-- /ko -->
            </span>
        </span>
    </a>
    <?php if ($block->getIsNeedToDisplaySideBar()): ?>
        <div class="block block-minicart empty"
             data-role="dropdownDialog"
             data-mage-init='{"dropdownDialog":{
                "appendTo":"[data-block=minicart]",
                "triggerTarget":".showcart",
                "timeout": "2000",
                "closeOnMouseLeave": false,
                "closeOnEscape": true,
                "triggerClass":"active",
                "parentClass":"active",
                "buttons":[]}}'>
            <div id="minicart-content-wrapper" data-bind="scope: 'minicart_content'">
                <h3 class="close-minicart">
                    <?php echo __('Mini Cart') ?> 
                    <button id="close-minicart"><i class="close-cart pe-7s-close pa"></i></button>
                </h3>
                <!-- ko template: getTemplate() --><!-- /ko -->
            </div>
            <?php echo $block->getChildHtml('minicart.addons'); ?>
        </div>
    <?php endif ?>
    <script>
        window.checkout = <?php /* @escapeNotVerified */ echo \Zend_Json::encode($block->getConfig()); ?>;
    </script>
    <script type="text/x-magento-init">
    {
        "[data-block='minicart']": {
            "Magento_Ui/js/core/app": <?php /* @escapeNotVerified */ echo $block->getJsLayout();?>
        },
        "*": {
            "Magento_Ui/js/block-loader": "<?php /* @escapeNotVerified */ echo $block->getViewFileUrl('images/loader-1.gif'); ?>"
        }
    }
    </script>
</div>
2

You need to review dropdown.js this class _has-modal-custom adding while you click on close button.

  • I checked in the console browser js during click on close button but did not display any message. Can you help me how can I check it? – Sylvester Aug 27 '18 at 8:21
  • try to find _has-modal-custom CSS class in body tag after clicking on the close button, I think the issue is you added a close button instead of link(a href). – kunj Aug 27 '18 at 8:32
  • I found this class _has-modal-custom . I updated my subject. – Sylvester Aug 27 '18 at 8:38
  • try after replace button tag to a tag – kunj Aug 27 '18 at 8:48

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.