Magento – Why the overriding of the success.phtml is not working

cachemagento2overridesphtml

I have copied and pasted the file from

vendor/magento/module-checkout/view/frontend/templates/success.phtml

to

app/design/frontend/THEME/THEMENAME/Magento_Checkout/templates/success.phtml

Modified some codes in that file, then after I have

  • cleared the cache
  • removed file manually from var/view_preprocessed and pub/static

But my code won't is displayed in the frontend.

Searched already via find command for another success.phtml file but nothing found.

Any ideas to override the success.phtml page?

Best Answer

In Magento 2.4.1 there are two success.phtml templates:

module-checkout/view/frontend/templates/success.phtml
module-inventory-in-store-pickup-frontend/view/frontend/templates/success.phtml

In my case, I had to override the second one in app/design/frontend/Vendor/Theme/Magento_InventoryInStorePickupFrontend/templates/success.phtml

Related Topic