In creating a new e-commerce site with K2 the Virtuemart checkout was showing all the homepage modules.
After reading a lot of different overly complex solutions on the forums I created this.
//add this code at the top of your template
global $option;
//disable modules for virtuemart checkout
$vmpage= 0;
if($option == 'com_virtuemart')
{
$vmpage= 1;
$mainWidth = "twoL";
}
//Then for every module position you need to turn off just add && !$vmpage
//example
if($this->countModules('right') && !$vmpage ){}
