So a couple of days ago, the mini-cart disappeared from my header container (next to search). I have it to appear even if there is nothing in it.
If I add a product, the button appears. It is very strange and I think that the client must have removed it by mistake and not telling us.
How can I add it again?
This is the homepage: https://www.homepharmacy.gr/
and this is how it looks if I add products:
Hard to know exactly without seeing the code. It could be a caching problem, depending on how the top cart is implemented. Certainly on regular category and product pages of the site the top-cart HTML isn't in the source of the page (even when you have an item in the cart) whereas it is in the source of the cart page (which is unlikely to be cached).
Cart is shown on on some CMS pages (communication) but not others (about us) which suggests a buggy implementation to me and my money would be on caching.
I thought about being a problem with caching. I am currently using Memcahed and Opcache. I have disabled Memcached to see if this changes anything, without any luck.
Is there a way to exclude the mini-cart from memcached and OCP?
Memcache and OpCache are technologies that are too low level to be the cause here. I thinkit would be block cache or full page cache. Are you using this?
Do you have a development or staging environment for this site, does the same thing occur?
I don't have a a staging or dev environment as this site is huge and I haven't figured yet on how to set this up properly.
I only use the FPC provided by magento and not a third party plugin. Concerning block cache, where can I find it in order to check it and exclude it?
I think it'll be hard to go much further without a development and staging environment to be honest. It will be very hard to debug this problem in production.
Block cache is also in the cache management section of Magento. I think it was less likely to be that. I'd ask if the same problem happened if you changed to the default Magento theme but you won't be able to do that on a live site.
OK, I will try to make a copy on a different vps to use as a testing site to figure this out.
So I have copied the site to a development server and played around. It looks like the problem is caused from FPC. When I disable it, the cart appears as it should.
I believe that disabling the FPC is not the way to go here (we get almost 1000 visitors per day), so can you help with another suggestion?
Looks like the theme that you're using that's providing the minicart isn't compatible with FPC. So you'll need to re-implement it so that it's done client side through an ajax request and a cookie or add a holepunch for the FPC.
Is your FPC from Magento Enterprise or some other extension?
I am using the default FPC. We run the website on Magento 18.104.22.168 ce. We didn't have any issues until this update, but as the theme was not also updated, I feel that there is a conflict somewhere.
Is there a way to leave the mini-cart outside the fpc? I tried adding the
on the cart block, but it didn't work.