Miva Merchant's standard output doesn't include a doctype specification, and due to the architecture, there is no way for a module to provide the ability to specify a doctype. Instead, one must use the following mechanism that was originally proposed by Tom Smith of www.tomcats.net. (And Tom, in deference to you, we can't help but add that this kind of "tomfoolery" isn't necessary in Miva Merchant 5!)
4.x versions of Miva Merchant have two files named "merchant.mvc". One resides in the Merchant2 directory, and one in a directory of the same name as the version of Miva Merchant being run. For instance, if you are running Miva Merchant 4.24, then under Merchant2 there is a folder named "4.24", and there is another file in that directory named "merchant.mvc", which is the file that outputs the opening <html> tag.
Merchant2/merchant.mvc is simply a stub file that calls 4.xx/merchant.mvc. Therefore, we can replace the stub file with one that outputs the doctype prior to calling 4.xx/merchant.mvc.
The following matrix is a list of downloadable replacement merchant.mvc stub files. Rename your original merchant.mvc file, and drop this into your Merchant2 directory instead.
Each zip file contains replacement merchant.mvc scripts for the following doctypes.