How to change the text "You have no items in your shopping cart." in mini cart in Magento 2
3 Answers
Please check with below path.
app/design/frontend/Magento/theme-name/Magento_Checkout/templates/cart/noItems.phtml
-
-
-
can you please check your theme module Magento_Checkout - have any content.html file. Jun 28, 2019 at 10:14
-
1this path - Magento_Checkout/web/template/minicart/content.html Jun 28, 2019 at 10:19
-
Create en_US.csv
file in your module vendor/Module/i18n/en_US.csv
Add below text in en_US.csv
file.
"You have no items in your shopping cart.","Add Your Changed Text Here."
Flush Your Magento cache php bin/magento c:f
-
-
please clear your cache properly, it might be some cache issue. or you can redeploy the content also. Jun 28, 2019 at 10:40
-
-
This does not work for me either (Other translations do). Tried with/without full stop & quotes. Even though I see in the DOM it is 'data-bind="i18n: 'You have no items in your shopping cart.'"'. Stupid Magento.– 00-BBBJan 7, 2021 at 12:04
Copy This File Into Your Theme :-
/vendor/magento/module-checkout/view/frontend/web/template/minicart/content.html
See Line no. 78
translate="'You have no items in your shopping cart.'"
You can change according to your requirements at above place.
Remove var folder from root and remove pub/static/frontend
folder.
You must have run command php bin/magento setup:static-content:deploy
Clear your browser cache and check.