I managed to get MagicZoom working on my site (
lillaslavender.com/lv/produkti
still work in progress)
What I needed was a bit different - I wanted Magic Zoom to work on Hikashop module.
What I did:
1. Published Magic Zoom module in header position of the site.
2. In HikaShop content module configuration "Parameters for DIV" -> "Type of item layout" I had selected "Image"(In "Parameters for products" "Link to the product page" must be set as "Yes"!). In HikaShop configuration "Display" -> "Views" I filtered by selecting my template name and "Frotend". In this list in column "Views" I found "Product" and then in column "File" corresponding "listing_img".
3. I edited listing_img. The code was:
<div style="height:<?php echo $this->image->main_thumbnail_y;?>px;text-align:center;clear:both;" class="hikashop_product_image">
<?php if($this->params->get('link_to_product_page',1)){ ?>
<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>">
<?php }
echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x, $this->image->main_thumbnail_y);
if($this->params->get('link_to_product_page',1)){ ?>
</a>
<?php } ?>
</div>
<?php
if($this->params->get('show_price')){
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
I changed it to
<div style="height:<?php echo $this->image->main_thumbnail_y;?>px;text-align:center;clear:both;" class="hikashop_product_image">
<?php if($this->params->get('link_to_product_page',1)){ ?>
<a href="/images/products/large/<?php echo ($this->row->file_path); ?>" class="MagicZoom">
<?php }
echo $this->image->display(@$this->row->file_path,false,$this->escape($this->row->file_name), '' , '' , $this->image->main_thumbnail_x, $this->image->main_thumbnail_y);
if($this->params->get('link_to_product_page',1)){ ?>
</a>
<?php } ?>
</div>
<a class="hikashop_module_product_link" href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>">
Details
</a>
<?php
if($this->params->get('show_price')){
$this->setLayout('listing_price');
echo $this->loadTemplate();
}
Basicly what I did was changing image link from
<a href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>">
to
<a href=/images/products/large/<?php echo ($this->row->file_path); ?>" class="MagicZoom">
Under /images/products/large/ I uploaded large pictures of products which I also used when making products in HikaShop. So the filenames were the same(HikaShop makes filenames web safe after upload, so originals must be web safe to start with for this to work).
Also I added
<a class="hikashop_module_product_link" href="<?php echo $link;?>" title="<?php echo $this->escape($this->row->product_name); ?>">
Details
</a>
so that there would still be a link to product.
As you can see, its very easy.