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 ?

  • are you talking about minicart? Commented Apr 28, 2016 at 8:41
  • yes is about minicart !
    – alexcr
    Commented Apr 28, 2016 at 9:32

2 Answers 2


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>

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) {
            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"
  • This is the file I was looking for , thank you for your time @Rakesh !
    – alexcr
    Commented Apr 28, 2016 at 9:57
  • if any issue then tell me Commented Apr 28, 2016 at 10:10

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.

  • 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
    Commented Apr 28, 2016 at 8:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.