OXID Community Forum

> International Forums > Templates and Design > Cleanest way to deactivate zoom?
Login
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread: Cleanest way to deactivate zoom?


Reply
 
Thread Tools Display Modes
#Top   #1  
Old 03-07-2012, 03:49 PM
breezemaster breezemaster is offline
Member
Join Date: Feb 2011
Location: Karlsruhe
Posts: 50
breezemaster is on a distinguished road
Default Cleanest way to deactivate zoom?

Title says it all. The article image zoom code is quite ingrained in the template. Whats the best technique to remove this feature?
Reply With Quote
#Top   #2  
Old 03-07-2012, 03:51 PM
breezemaster breezemaster is offline
Member
Join Date: Feb 2011
Location: Karlsruhe
Posts: 50
breezemaster is on a distinguished road
Default Re: Cleanest way to deactivate zoom?

Simply remove that if/else statement so we're just left with <div class="picture">?

Quote:
[{block name="details_productmain_zoom"}]
[{if $oView->showZoomPics()}]
[{oxscript include="js/widgets/oxmodalpopup.js" priority=10 }]
[{oxscript add="$('#zoomTrigger').oxModalPopup({target:'#zoom Modal'});"}]
<a id="zoomTrigger" rel="nofollow" href="#">Zoom</a>
[{oxscript include="js/libs/cloudzoom.js" priority=10}]
[{oxscript add="$('.cloud-zoom, .cloud-zoom-gallery').CloudZoom();"}]
<div class="picture">
<a href="[{$oPictureProduct->getMasterZoomPictureUrl(1)}]" class="cloud-zoom" id="zoom1" rel="adjustY:-2, zoomWidth:'354', fixZoomWindow:'390', trImg:'[{$oViewConf->getImageUrl('dot.png')}]', loadingText:'[{oxmultilang ident="PAGE_DETAILS_ZOOM_LOADING"}]'">
<img itemprop="image" src="[{$oView->getActPicture()}]" alt="[{$oPictureProduct->oxarticles__oxtitle->value|strip_tags}] [{$oPictureProduct->oxarticles__oxvarselect->value|strip_tags}]">
</a>
</div>
[{else}]
<div class="picture">
<img itemprop="image" src="[{$oView->getActPicture()}]" alt="[{$oPictureProduct->oxarticles__oxtitle->value|strip_tags}] [{$oPictureProduct->oxarticles__oxvarselect->value|strip_tags}]">
</div>
[{/if}]
[{/block}]
Reply With Quote
#Top   #3  
Old 03-30-2012, 04:59 PM
morfer morfer is offline
Junior Member
Join Date: Aug 2011
Posts: 15
morfer is on a distinguished road
Default AW: Cleanest way to deactivate zoom?

I also want to remove the zoom function. But its hard to remove! It seems that the variants selector is connected to some functions from cloudzoom.

Simply removing the mentioned part does not work! The variants are not selectable anymore.

Simply removing the JS lines don't work either:
Code:
[{oxscript include="js/libs/cloudzoom.js" priority=10}]
[{oxscript add="$('.cloud-zoom, .cloud-zoom-gallery').CloudZoom();"}]
So how to remove this function?

EDIT////
One quick&dirty solution:
Simply add to oxid.css:
Code:
div.mousetrap {display:none;}
This hack works for me...

Last edited by morfer; 03-30-2012 at 05:20 PM.
Reply With Quote
#Top   #4  
Old 09-12-2014, 09:49 PM
Earlybird's Avatar
Earlybird Earlybird is offline
Senior Member
Join Date: Dec 2009
Posts: 487
Earlybird is on a distinguished road
Default AW: Cleanest way to deactivate zoom?

Dear morfer,


Thanks for the easy css workaround.

Here are some additions w/o hover on main Image and w/o bugs in devtool up to current Oxid 487 Azure Theme.

(1) oxid.css: added this to drop the cloud


div.mousetrap {display:none;}

(2) productmain.tpl block: changed the <a> to <tag> this turns off hover

[{block name="details_productmain_zoom"}]
[{oxscript include="js/libs/cloudzoom.js" priority=10}]
[{if $oView->showZoomPics()}]
[{oxscript include="js/widgets/oxmodalpopup.js" priority=10 }]
[{oxscript add="$('#zoomTrigger').oxModalPopup({target:'#zoom Modal'});"}]
<a id="zoomTrigger" rel="nofollow" href="#">Zoom</a>
[{oxscript add="$('#zoom1').attr( 'rel', $('#zoom1').attr('data-zoomparams'));"}]
[{oxscript add="$('.cloud-zoom, .cloud-zoom-gallery').CloudZoom();"}]
<div class="picture">
<tag href="[{$oPictureProduct->getMasterZoomPictureUrl(1)}]" class="cloud-zoom" id="zoom1" rel='' data-zoomparams="adjustY:-2, zoomWidth:'354', fixZoomWindow:'390', trImg:'[{$oViewConf->getImageUrl('dot.png')}]', loadingText:'[{oxmultilang ident="LOADING"}]'">
<img src="[{$oView->getActPicture()}]" alt="[{$oPictureProduct->oxarticles__oxtitle->value|strip_tags}] [{$oPictureProduct->oxarticles__oxvarselect->value|strip_tags}]">
</tag>
</div>
[{else}]
<div class="picture">
<img src="[{$oView->getActPicture()}]" alt="[{$oPictureProduct->oxarticles__oxtitle->value|strip_tags}] [{$oPictureProduct->oxarticles__oxvarselect->value|strip_tags}]">
</div>
[{/if}]
[{/block}]

(3) cloudzoom.js: uncommented this function to drop "loading" indicator

/*
setTimeout(function () {
// <img src="/images/loading.gif"/>
if ($mouseTrap === null) {
var w = jWin.width();
var tagetW = sImg.width()+"px";
var targetH = sImg.height()+"px";
var targetLeft = sImg.position().left+"px";
var targetTop = sImg.position().top+"px";
jWin.parent().append(format('<div style="width:'+tagetW+';height:'+targetH+';positio n:absolute;top:'+targetTop+';left:'+targetLeft+';t ext-align:center" class="cloud-zoom-loading" >'+opts.loadingText+'</div>', w / 3, (w / 2) - (w / 6))).find(':last').css('opacity', 0.5);
}
}, 200);
*/

Hope this helps some other guys to get completely rid of the cloud.

Last edited by Earlybird; 09-12-2014 at 09:53 PM.
Reply With Quote
Reply

Bookmarks

Tags
cleanest, deactivate, zoom

« Previous Thread | Next Thread »
Thread Tools
Display Modes

Nicht Sichtbar
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Zoom Picture Plus aggrosoft Module 26 03-18-2012 05:20 PM
Cloud Zoom schmaiki Module 33 01-29-2012 01:00 PM
Sortierung der Zoom Bilder rallemann Templates und Design 2 08-19-2011 10:08 AM
AJAX-ZOOM - Bild Zoom Plugin ohne Flash vadus Module 7 08-10-2011 12:05 AM
ZOOM bei Varianten valero Allgemeines 2 11-10-2009 10:33 AM

All times are GMT +1. The time now is 06:59 PM.