cancel
Showing results for 
Search instead for 
Did you mean: 

How to change a phtml file in the vendor/ folder?

How to change a phtml file in the vendor/ folder?

Hi 

I am trying to make changes to a phtml in 

vendor/magento/module-newsletter/view/frontend/templates. I have made a new directory and placed the new phtml file to the app/design/frontend/Swissup/argento-pure2/Magento_Newsletter/templates. Does this sound correct? I'm unsure of my Theme Vendor and my Theme Name, I guessed them to be Swissup and argento-pure2. When I check using template-hints, it still doesn't use the modified version. What am I missing? 

Thank you

4 REPLIES 4

Re: How to change a phtml file in the vendor/ folder?

@kanchi777k3aa3 

You can find correct theme name from pub like(/pub/static/frontend/Mgs/child_claue => In my case Mgs /child_claue is theme name). Just copy that name and paste in app/design/frontend
now it is /app/design/frontend/Mgs/child_claue.
 
Check your store has applied that theme properly or not.
 
Then add the Magento_Newsletter folder and add templates to it.
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: How to change a phtml file in the vendor/ folder?

If your current store theme is

Swissup/argento-pure2

then this is your correct path of files :

app/design/frontend/Swissup/argento-pure2/Magento_Newsletter/templates


After doing above things run this commands from CLI and then check.

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
sudo chmod -R 777 var/ generated/ pub/


 

Was my answer helpful? You can Click Kudos/Accept As Solution.
150+ professional extensions for M1 & M2 with free lifetime updates!

Re: How to change a phtml file in the vendor/ folder?

@Sanjay Jethva @Dhiren Vasoya 

It still doesn't work

 

I check the folder pub/static/frontend and the admin page. 

 

admin: content/design/themes (here a few themes are listed)

Capture1.PNG

 

admin: content/design/configuration

Capture2.PNG

pub/static/frontend

Capture3.PNG

Re: How to change a phtml file in the vendor/ folder?

You need to confirm those things by doing this one :

1. You are checking proper theme which is loaded on the store frontend.

2. Same file is not override by other extension.

3. Enable the template path hints for your store and check which template current call on that place as of now. so you get idea.

Was my answer helpful? You can Click Kudos/Accept As Solution.
150+ professional extensions for M1 & M2 with free lifetime updates!