Skip to main content

myMy name is Costin and I am a beginner Magento 2 developer. I have a question regarding on how

How to add a button to add a button to headerheader.phtml and to be displayed on the frontend?

What I have done until now:

  • I create a basic module in /app/code/Vendor_Name_Module_Name - folder

    I create a basic module in

/app/code/Vendor_Name_Module_Name

  • Copied the file vendor/magento/module/theme/view/frontend/templates/html/header.phtml into /app/code/Vendor_Name_Module_Name/theme/view/frontend/templates/html/header.phtml.

    Copied the file

vendor/magento/module/theme/view/frontend/templates/html/header.phtml into /app/code/Vendor_Name_Module_Name/theme/view/frontend/templates/html/header.phtml.

what I want to achieve is : add button

Any help is much appreciated.

my name is Costin and I am a beginner Magento 2 developer. I have a question regarding on how to add a button to header.phtml and to be displayed on the frontend?

What I have done until now:

  • I create a basic module in /app/code/Vendor_Name_Module_Name - folder

  • Copied the file vendor/magento/module/theme/view/frontend/templates/html/header.phtml into /app/code/Vendor_Name_Module_Name/theme/view/frontend/templates/html/header.phtml.

what I want to achieve is : add button

Any help is much appreciated.

My name is Costin and I am a beginner Magento 2 developer. I have a question regarding on

How to add a button to header.phtml and to be displayed on the frontend?

What I have done until now:

  • I create a basic module in

/app/code/Vendor_Name_Module_Name

  • Copied the file

vendor/magento/module/theme/view/frontend/templates/html/header.phtml into /app/code/Vendor_Name_Module_Name/theme/view/frontend/templates/html/header.phtml.

what I want to achieve is : add button

Any help is much appreciated.

Source Link

Magento 2 - Add a Custom Button to header.phtml

my name is Costin and I am a beginner Magento 2 developer. I have a question regarding on how to add a button to header.phtml and to be displayed on the frontend?

What I have done until now:

  • I create a basic module in /app/code/Vendor_Name_Module_Name - folder

  • Copied the file vendor/magento/module/theme/view/frontend/templates/html/header.phtml into /app/code/Vendor_Name_Module_Name/theme/view/frontend/templates/html/header.phtml.

what I want to achieve is : add button

Any help is much appreciated.