Joomla Modules within Virtuemart VMX
Written by Thomas Kahl   
Friday, 28 May 2010 11:46

To extend the layout-options for Virtuemart and make it easy for you to use, we have added several module positions within Virtuemart. Until now, it was quite difficult to display modules only on special Virtuemart pages. You had to add Menuitems and assign them to modulepositions. This was OK as long as you didn’t want to place modules on special categories or products. In this case, you had to handle a lot of menuitems and had to change them each time something in Virtuemart changed.

From now on – with VMX – you can use predefined modulepositions! Just create any new module and add it to your Virtuemart. But this is not enough. With a simple line of code, you can add your own modulepositions to the Virtuemart themes.


 

The following Modulepositions are predefined

  • vm_index_top, vm_index_bottom
    Will be shown before and after the Shop-Index-Page
  • vm_browse_top, vm_browse_bottom, vm_browse_top_XX, vm_browse_bottom_XX
    Will be shown at the top and at the bottom of the browse-pages (category-pages). As cou can see, the positions are available two times – once with “XX”. This can be used to place modules only on special category-pages. Just replace the “XX” with a category-id (e.g. vm_browse_top_123) and the module will only show up on the browsepage of this specific category.
  • vm_flypage_top, vm_flypage_bottom, vm_flypage_top_XX, vm_flypage_bottom_XX, vm_flypage_top_featured, vm_flypage_bottom_featured
    Will be shown at the top and at the bottom of the productflypage. As above, replace the “XX” with a product-id to show it only on specific products. We have also added the “featured” option – you guess right – which will only be loaded if it is a featured product.
  • vm_checkout_top, vm_checkout_bottom, vm_checkout_top_X, vm_checkout_bottom_X
    Will be shown at the top or the bottom of the checkout-pages. The option “X” here represents the checkout-stage: 0 – Login / Register, 1 – Shippingaddress …
  • vm_register_top, vm_register_bottom
    Shown on the registration page
  • vm_cart_top, vm_cart_bottom
    shown on the cart page

There are more positions to come… Until then, just define your own! It is very easy – just add the following line to a theme-template of your choice:

$vm_mainframe->showModules("your_position_name");

If you need to check the existance of modules, you can also get the number of modules of a position:

$modulecount=$vm_mainframe->countModules("your_position_name");
Trackback(0)
Comments (0)Add Comment

Write comment
smaller | bigger

security code
Write the displayed characters


busy
 

Blog Newsletter

Blog RSS-Feed Click here

Subscribe to our Blog Newsletter

Enter your email address:

Delivered by FeedBurner