0

I'm using magento 2 , and I need to find the cart close button and go to checkout button actions , and edit it , but I can't find the right files for that, does anyone knows where to find them ?

2
  • are you talking about minicart? Apr 28 '16 at 8:41
  • yes is about minicart !
    – alexcr
    Apr 28 '16 at 9:32
1

Go to file path, vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js

check below part for close button html like,

<button type="button" id="btn-minicart-close" class="action close" data-action="close" data-bind="attr: { title: $t('Close') }" title="Close">
        <span><!-- ko i18n: 'Close' --><span>Close</span><!-- /ko --></span>
    </button>

For close button html in minicart above display we can find data-action="close" from js file.

closeSidebar: function() {
            var minicart = $('[data-block="minicart"]');
            minicart.on('click', '[data-action="close"]', function(event) {
                event.stopPropagation();
                minicart.find('[data-role="dropdownDialog"]').dropdownDialog("close");
            });
            return true;
        }

Here list of url for checkout, update button, login url, remove button

 "url": {
            "checkout": window.checkout.checkoutUrl,
            "update": window.checkout.updateItemQtyUrl,
            "remove": window.checkout.removeItemUrl,
            "loginUrl": window.checkout.customerLoginUrl,
            "isRedirectRequired": window.checkout.isRedirectRequired
        },
        "button": {
            "checkout": "#top-cart-btn-checkout",
            "remove": "#mini-cart a.action.delete",
            "close": "#btn-minicart-close"
        }
2
  • This is the file I was looking for , thank you for your time @Rakesh !
    – alexcr
    Apr 28 '16 at 9:57
  • if any issue then tell me Apr 28 '16 at 10:10
0

Go to admin panel:

For Front End:

Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront > Yes

Then clean your cache by running php bin/magento cache:clean from your root folder.

Then you can see template path hint will be enable and then you can find any files which you want to edit.

1
  • I know how to get into the /home/aspirede/public_html/app/design/frontend/Venustheme/yume/Magento_Checkout/templates/cart/minicart.phtml file , my problem is I can't find where the actions are written.. the the functions are properly written..
    – alexcr
    Apr 28 '16 at 8:39

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.