1

How to change the text "You have no items in your shopping cart." in mini cart in Magento 2

art

  • i sure about this text is come from the content.html file – Rk Rathod Jun 28 at 11:12
1

Please check with below path.

app/design/frontend/Magento/theme-name/Magento_Checkout/templates/cart/noItems.phtml
  • no text not changed – divya sekar Jun 28 at 10:06
  • let me try from my side. – Anas Mansuri Jun 28 at 10:13
  • can you please check your theme module Magento_Checkout - have any content.html file. – Anas Mansuri Jun 28 at 10:14
  • 1
    this path - Magento_Checkout/web/template/minicart/content.html – Anas Mansuri Jun 28 at 10:19
  • i will try it sir – divya sekar Jun 28 at 10:31
1

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

  • text not changed – divya sekar Jun 28 at 10:06
  • please clear your cache properly, it might be some cache issue. or you can redeploy the content also. – Rizwan Khan Jun 28 at 10:40
  • i clear it but it not happen – divya sekar Jun 28 at 10:46
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.