Tuesday, March 15, 2011

Remove modules from Virtuemart Checkout

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 ){}


Stumble Upon CodePyro

5 comments:

Anonymous said...

Absolut great Work!!! Thanks Man that's exactly what i needed.

Greetz from ger

Ruffnax

Администратор said...

Thanks MAN. You are great. I would br glad to know you..

Josh Tischer :: CodePyro said...

No Problem... glad I could help

Anonymous said...

where is the "global" file located?
thanks man!

Josh Tischer :: CodePyro said...

This code snippet goes in your template index.php file. The global reference is calling the PHP global variable scope.

http://php.net/manual/en/language.variables.scope.php

Post a Comment