Mod VM ModController Documentation Print

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), categories, and shopper groups.

Installation

Upload the package file mod_vm_modcontroller_pro.zip and install as normal using the Joomla! installer.

Usage

  1. Firstly set up the module that you wish to display, then unpublish it in the Joomla module manager.
  2. Now create a new instance of VM Modcontroller. In 'Menu Assignment' set it to appear on 'All'.
  3. Use the module parameters on the right side of the page to choose which Virtuemart pages will display the module.
  4. Set the 'Choose Module' parameter to select the module that you wish to display - the modules will be listed by their titles.
  5. Now select the parameters to control the module display.

 

(click on the image above to view a larger version)

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. The most important detail to know is that the main Virtuemart category page is 'shop.browse', while the main Virtuemart product flypage is 'shop.product_details'.
  • 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.
  • 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.
  • 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.

Virtuemart Pages

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.

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.