문제

This is the Magento core template path:

vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml

I would like know how to override this template with my theme.

도움이 되었습니까?

해결책

Simple copy minicart.phtml from following

vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml

and put in

root/app/design/VenderName/ThemeName/Magento_Checkout/templates/cart/minicart.phtml

Flush your cache and check.

다른 팁

The only thing that worked was manually clearing the contents of pub/static/ but make sure that you don't delete the .htaccess file inside pub/static/ folder

Some of the things that I tried and didn't work

  1. Adding a mapping in requirejs-config.js (Both in the code and design folders)

    "map": {
        "*": {
            'Magento_Checkout/template/minicart/content.html': 'Magento_Theme/template/minicart/content.html'
        }
    } 
    
  2. bin/magento setup:static-content:deploy -f --theme Vendor/module en_GB en_US

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top