문제

I have used default Magento 2 mini cart dropdown and my account dropdown it's working fine. But I'm facing the issue if we click my account tab mini cart dropdown still open I want to hide when we click my account tab.

도움이 되었습니까?

해결책

Add below script in app/design/frontend/VENDOR/THEMENAME/Magento_Customer/templates/account/customer.phtml. this will solve your issue

<script type="text/javascript">
    requirejs(['jquery'], function($)
    {
        $('div.block.block-minicart').on('dropdowndialogopen',function () 
        {
            $('.customer-menu').attr('aria-hidden', 'true');
            $('.customer-welcome').removeClass('active');
            $('.customer-name').removeClass('active');
        });

        $(document).on('click.hideDropdown', function (e) 
        {
            $("div.block.block-minicart").dropdownDialog("close");
        });
    });
</script>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top