Jump to content
xt:Commerce Community Forum

zusatzartikelbilder ohne thickbox??


Recommended Posts

habe in der product.html folgendes getauscht:


<div id="productinfoimages">

    <a href="{img img=$products_image type=m_popup path_only=true}" class="thickbox" rel="prod_gallery">{img img=$products_image type=m_info alt=$products_name|escape:"html"}</a>

</div>

durch

<div id="productinfoimages">

    {if $products_image!=''}

        <img name="picture" src="media/images/product/popup/{$products_image|replace:"product:":""}" alt="{$products_name}" id="big" />

    {/if}

</div>

und:
	

{if $more_images !=''}

    {foreach name=aussen item=img_data from=$more_images}

       <a href="{img img=$img_data.file type=m_popup path_only=true}" class="thickbox" rel="prod_gallery">{img img=$img_data.file type=m_thumb alt=$products_name}</a>

    {/foreach}

{/if}

durch

{if $more_images !=''}

    {foreach name=aussen item=img_data from=$more_images}

        <a onclick="MM_swapImage('big','','media/images/product/popup/{$img_data.file|replace:'product:':''}',0)" class="thickbox space10" rel="prod_gallery">{img img=$img_data.file type=m_thumb alt=$products_name}</a>

    {/foreach}

{/if}

und schliesslich in der js.php folgenden code eingefuegt:

<script type="text/javascript">


function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}


function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}


</script>

damit wird die thickbox niocht mehr angesprochen und über die id="big"

das bild via js getauscht :)

ringo

Link to comment
Share on other sites

  • 10 months later...

Danke, dieser Tipp hat mir sehr geholfen!

Habe das Ganze jetzt aber noch etwas weiter entwickelt, so dass auch das erste Produktbild noch als Thumbnail mit auftaucht. Folgendes habe ich dafür in der product.html eingefügt:

div id="productinfoimages">

        {if $products_image!=''}

            <img name="picture" src="media/images/popup/{$products_image|replace:"product:":""}" alt="{$products_name}" title="{$products_name}" id="big" />

        {/if}

    </div>
und
            <div id="productsmallimages">

            {if $more_images !=''}

                <a onMouseOver="MM_swapImage('big','','media/images/popup/{$products_image|replace:"product:":""}',0)" class="thickbox space10" rel="prod_gallery" alt="{$products_name}" title="{$products_name}"><img name="picture" src="media/images/info/{$products_image|replace:"product:":""}" alt="{$products_name}" title="{$products_name}"/></a>

                {foreach name=aussen item=img_data from=$more_images}

                <a onMouseOver="MM_swapImage('big','','media/images/popup/{$img_data.file|replace:'product:':''}',0)" class="thickbox space10" rel="prod_gallery" alt="{$products_name}" title="{$products_name}">{img img=$img_data.file type=m_info alt=$products_name}</a>

                {/foreach}

            {/if}

            </div>

Link to comment
Share on other sites

  • 3 months later...

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...