Shopping Basket

 x 
Cart empty


Popular Items

Find Us Elsewhere

Mod VM ModController Documentation

Module VM ModController Pro

This module allows you to control the display of other Joomla modules on Virtuemart pages. It allows you to assign modules to Virtuemart pages (including specific flypages or browse pages with Virtuemart 1.1x), categories, manufacturers and shopper groups.

The module comes in two versions: VM Modcontroller is compatible with Virtuemart 1.1x and Joomla 1.5, VM2 Modcontroller Pro is compatible with Virtuemart 2 and Joomla 1.5/1.6/1.7/2.5.

Installation

Unpack the main download package first. Upload the package file mod_vm_modcontroller_pro.zip or mod_vm2_modcontroller_pro.zip and install as normal using the Joomla! installer.

The operation is much the same in both versions of the module, though there are some differences in the module admin parameters which reflect the different ways that the two versions of Virtuemart work.

Usage

  1. Firstly set up the module that you wish to display, checking that it looks as you want, then unpublish it in the Joomla module manager. Please note that the module should normally be set to appear on all pages in the Joomla menu assignment, its actual display will be handled by the modcontroller.
  2. If you are using Joomla 2.5 it is best to now set the module to a non-existent module position, this may help to avoid template problems. In Joomla 1.5 this can cause problems so don't do this.
  3. Now create a new instance of VM(2) Modcontroller. In 'Menu Assignment' set it to appear on 'All'. Set it to the Joomla module position that you want it to be displayed in.
  4. Set the 'Choose Module' parameter to select the module that you wish to display - the modules will be listed by their titles and id numbers.
  5. Use the module parameters on the right side of the page to choose which Virtuemart pages will display the module.
  6. Now select the parameters to control the module display.

Click here to view the admin parameters for VM Modcontroller with Virtuemart 1.1x.

Click here to view the admin parameters for VM2 Modcontroller with Virtuemart 2.

 

 

The control parameters are used as follows:-

  • Use the VM Categories parameter to select which Virtuemart categories will display the module: if you don't want to filter by category, leave this set to 'All Categories'
  • Use the VM Page parameter to select the page(s) which will display the module - use Control Click to select more than one. See below for an explanation of Virtuemart pages.
  • Use the 'Flypage' parameter to display the module only for a specific flypage - use Control Click to select more than one. If you want the module to display only on the product flypage you will need to set the VM Page parameter to 'shop.product_details' as well (applies to Virtuemart 1.1x only).
  • Use the 'Browse Page' parameter to display the module only for a specific type of category browse page - use Control Click to select more than one. If you want the module to display only on the category browse page you will need to set the VM Page parameter to 'shop.browse' as well (applies to Virtuemart 1.1x only).
  • The 'User Type' parameter allows you to display the module only to site visitors, or only to logged in users.
  • The 'Shopper Group' parameter allows you to display the module only to selected shopper groups, eg only to wholesale customers. Use Control Click to select more than one group.
  • The manufacturer parameter allows you to filter by manufacturers.
  • Other options allow you to filter by SSL or non-SSL pages; or by Virtuemart of non-Virtuemart pages only.
  • You can set the default behaviour of the module, this can be to either hide or show the module, for example if you only want to show the module on the browse page of one category you may find it helpful to set this to 'hide', then just select the category for which you want to display.

Pages in Virtuemart 1.1x

The Virtuemart pages that customers normally see are prefixed by 'shop' for the main shop pages, 'account' for customer account pages, and 'checkout' for checkout pages. The second part of the name is related to the specific page function, for example 'checkout.result' is the page that customers are redirected to after payment has been made.

The main Virtuemart category page is 'shop.browse', while the main Virtuemart product flypage is 'shop.product_details'. The main customer account page is 'account.index'. If you have created any custom Virtuemart pages you should see it listed in the parameters provided it uses the 'shop', 'checkout' or 'account' prefix.

 

Pages in Virtuemart 2

In Virtuemart 2 the pages correspond to Joomla views, as with most standard Joomla extensions.

Controlling the Display of More Than One Module

You can have as many instances of VM Modcontroller as you wish, so just use one for each module whose display you need to control.

Empty Modules

It may happen that when the module is not displaying any output, the outline of an empty module is still visible. This is due to a Joomla bug. Joomla outputs 'module chrome' which is used to surround the module and format the module display. With some chromes it does not check if there is actually any output before doing so, which produces this undesirable result.

For this reason we include a file 'modules.php' which is designed to deal with this problem. If you are experiencing this issue then you need to upload the file to the site folder 'templates/system/html/modules.php' to overwrite the existing file. If you are not experiencing this problem then there is no need to do this.

If your site template includes some custom chrome this may also need to be adapted to check for module content - we can advise on this if necessary.