Here is a solution to use Rokbox plugin in virturemart for Joomla 1.5. Virtuemart is an eccommerce component for Joomla where products can be sold online or viewed as product catalog. I have come across a this problem many times where the virtuemart light box just stops working and every time you click on a product image or thumb it takes you to a separate window instead of a light box. Here I will go over how to add the nice lightbox effect using Rokbox plugin.
- Install Rokbox plugin from www.Rocketthemes.com
- Make sure to check the plugin is enabled in your joomla site.
- Edit this file located in your host: administrator/components/com_virtuemart/classes/htmlTools.class.php
- Find this code section function getLightboxImageLink( $image_link, $text, $title='', $image_group='' )
- Replace it with: function getLightboxImageLink( $image_link, $text, $title='', $image_group='' ) {
vmCommonHTML::loadSlimBox();
if( $image_group ) {
//$image_group = '['.$image_group.']';
$image_group = '('.$image_group.')';
}
//$link = vmCommonHTML::hyperLink( $image_link, $text, '', $title, 'rel="lightbox'.$image_group.'"' );
$link = vmCommonHTML::hyperLink( $image_link, $text, '', $title, 'rel="rokbox[500 500]'.$image_group.'"' );
return $link;
} - If you can not edit files directly in your hosting account. I recommend using filezilla to download, the file where you can edit in Dreamweaver or a simpe text editor and make sure to upload the edited file.