2

Seems like a pretty simple task but I've edited minicart.phtml with <span data-bind="html: getCartParam('subtotal')"></span> and can't seem to figure out why I can't get subtotal next to the shopping cart icon and item count in the upper right hand area.

enter image description here

What is the file that needs to be edited?

vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml

or it is in prepossessed ?

Anas Mansuri
  • 2,627
  • 1
  • 11
  • 28
Head
  • 177
  • 11
  • 27
  • Files that live in preprocessed are disposable. Any effort spent on those files will be lost. Same with pub/static – Shawn Abramson May 01 '18 at 20:52
  • @ShawnAbramson noted* I had a feeling that was the case with those folders. When you deploy static content it gets moved to those folders as a cached version or something to process content/data faster or something? – Head May 01 '18 at 20:58
  • Thats correct. Magento goes through all installed modules and themes and sorts files in terms of the fallback order. Ultimately, they end up in pub/static. Anything inside of the entire var folder is disposable, not just the view_preprocessed. Also pub/static of course. – Shawn Abramson May 01 '18 at 21:03
  • @ShawnAbramson Thanks for clarification, getting a bit off topic now but if i was to rm -rf pub/* var/* it would just rebuild afterwards? For instance I've been wondering if i could delete that off my master and then push to github/bitbucket so it's gone from my repo and then add it to my .gitignore ... assuming it's just going to rebuild everything inside those folders and then my .gitignore would just ignore like it's suppose to? – Head May 01 '18 at 21:13
  • Ok, there are several parts to this answer, you might be best off asking an official question and I can type up a full explanation. If you are in developer mode, it will rebuild automatically. If you are in production mode, you will need to php bin/magento set:static-content:deploy and then php bin/magento cache:flush. The var folder actually should not be in your repo to start with, with the exception of the .htaccess file that lives within it. Most, but not all, of pub, should be excluded too. Take a look at the .gitignore file included in your Magento install. – Shawn Abramson May 01 '18 at 21:19
  • You can do something like git rm -rf --cached var/view_preprocessed, and so on for each of the sub folders. Just leave .htaccess committed. This will remove it from tracking on git. Be sure to add the deleted files to your .gitignore file if they are not already there,. – Shawn Abramson May 01 '18 at 21:21
  • I'm not using any .htaccess nor apache. – Head May 01 '18 at 21:22
  • Even better. It would not hurt to keep it but it sounds like there will be no harm if you delete it. – Shawn Abramson May 01 '18 at 21:22

0 Answers0