There are laws in place in most countries meaning yes.
Even ignoring legal issues, for practical purposes society has accepted cash as the way to do trade. Everybody has cash (credit cards and checks are a proxy for cash) Thus a supermarket that doesn't accept cash is going to have problems selling anything because most people won't really know.
I'd like to know too! The only ones I could find in a quick search are France and (maybe?) China. Knowing about the others might be useful when travelling.
Even ignoring legal issues, for practical purposes society has accepted cash as the way to do trade. Everybody has cash (credit cards and checks are a proxy for cash) Thus a supermarket that doesn't accept cash is going to have problems selling anything because most people won't really know.