Jump to content
xt:Commerce Community Forum

Thickbox ersetzen mit ColorBox


giller

Recommended Posts

  • 1 month later...
  • 5 months later...
  • 5 months later...

Kurz knapp

1. Colorbox Runterladen

2. in die xtFramwork entpacken

3. in deinem Template im ordner javasript das sript einbinden von der colorbox

4. die css formatireung würde ich direkt in deine style.css packen

zwecks performance.

5. template anpassen damit die box auch wies welche bilder mit ihr

geöfnet werden sollen

Es währe schön wenn du dich jetzt selber reinkniest und erstmal probierst

alls lehrn efect

Link to comment
Share on other sites

Danke aber das klappt so nicht.

Habe es so versucht.

1. das komplette colorbox Verzeichnis ins xtFramework/libraries hochgeladen.

2. in der js.js meines Templates habe ich folgendes hinzugefügt:

<script type="text/javascript" src="<?php echo _SYSTEM_BASE_URL . _SRV_WEB; ?>xtFramework/library/colorbox/colorbox/jquery.colorbox-min.js"></script>

3. im Template product.html class="thickbox" durch class="colorbox" ersetzt.

Leider klappt es so nicht. Wenn ich nun versuche Bilder im Shop zu öffnen, erscheinen diese ganz normal - als neues Internet Tab.

Wäre super, wenn Du mich auf die richtige Spur führen wrüdest :-)

Link to comment
Share on other sites

schätze deine library wird nicht richtig geladen ...

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>

hast du auch das in deiner js.php bedacht?

Ja, Eintrag in der js.php wie folgt:

<script type="text/javascript" src="<?php echo _SYSTEM_BASE_URL . _SRV_WEB; ?>xtFramework/library/jquery/jquery-1.2.6.min.js"></script>[/CODE]

Keiner sonst eine Idee? :-(

Link to comment
Share on other sites

Kommentiere

<script type="text/javascript" src="<?php echo _SYSTEM_BASE_URL . _SRV_WEB; ?>xtFramework/library/jquery/jquery-1.2.6.min.js"></script>
mal aus und füge einfach stattdessen
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>

ein.

Der Unterschied liegt in der Version der library - das könnte zumindest der Fehler sein ...

Link to comment
Share on other sites

Danke aber das klappt so nicht.

3. im Template product.html class="thickbox" durch class="colorbox" ersetzt.

Leider klappt es so nicht. Wenn ich nun versuche Bilder im Shop zu öffnen, erscheinen diese ganz normal - als neues Internet Tab.

Wäre super, wenn Du mich auf die richtige Spur führen wrüdest :-)

rel=colorbox

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...

Habe das selbe problem, das bild wird in einer neuen seite angezeigt.

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

Link to comment
Share on other sites

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo _SYSTEM_BASE_URL . _SRV_WEB; ?>xtFramework/library/jquery/thickbox-compressed.js"></script>
<script type="text/javascript" src="<?php echo _SYSTEM_BASE_URL . _SRV_WEB; ?>xtFramework/library/jquery/jquery.colorbox-min.js"></script>[/HTML]

Link to comment
Share on other sites

thickbox ist draßen und der pfad für colorbox stimmt auch.

Hier mal meine product.html, vielleicht habe ich etwas übersehen.

{socialbookmark url=$products_link title=$products_name}

{if $date_available!=''}
<ul class="info_info">
<li class="infoInfo">{txt key=TEXT_PRODUCT_AVAILABLE} {$date_available|date_format:"%A, %B %e, %Y"}</li>
</ul>
<br />
{/if}

<div id="productinfowrap">
{if $products_image!=''}
<div class="image">
<div id="productinfoimages">
<a href="{img img=$products_image type=m_popup path_only=true}" class="colorbox" rel="prod_gallery">{img img=$products_image type=m_info alt=$products_name|escape:"html"}</a>

</div>
{/if}
</div>
{if $products_image!=''}<div id="productinfopricewithimages">{else}<div id="productinfopricewithoutimages">{/if}
<div id="productinfoprice">
<h1>{$products_name}</h1>
{if $smarty.const._CUST_STATUS_SHOW_PRICE eq '1'}
{if $products_weight > 0}<p class="taxandshippinginfo">{txt key=TEXT_PRODUCTS_WEIGHT}: {$products_weight|number_format:2:",":"."} KG</p>{/if}

{if $stock_image}
<p class="stockimage">{img img=$stock_image.image type=t_img_stockrules alt=$stock_image.name}</p>

<p class="stockimagetext">{$stock_image.name}</p>
{/if}
{if $review_stars_rating}
<div class="reviews_rating_light"><div class="reviews_rating_dark" style="width:{$review_stars_rating}%"></div></div>
<p class="reviews_text">{if $products_rating_count}{$products_rating_count}{else}0{/if} <a href="{$link_reviews_list}">{txt key=TEXT_XT_REVIEWS_INFO}</a> | <a href="{$link_reviews_write}" rel="nofollow">{txt key=TEXT_XT_REVIEWS_WRITE}</a></p>
{/if}

<div class="price_box">
<p class="productprice">{$products_price.formated}</p>

<p class="taxandshippinginfo">{$products_tax_info.tax_desc}{if $products_shipping_link}<br /><a href="{$products_shipping_link}" target="_blank" rel="nofollow">{txt key=TEXT_EXCL_SHIPPING}</a>{/if}</p>
{price_table}
{/if}
{if $base_price}{$base_price.price} {txt key=TEXT_SHIPPING_BASE_PER} {$base_price.vpe.name}{/if}
{if $products_discount!=''}{$products_discount}{/if}
{if $products_model!=''}{txt key=TEXT_PRODUCTS_MODEL}: {$products_model}{/if}
{if $smarty.const._CUST_STATUS_SHOW_PRICE eq '1'}{if $link_priceinquiry}<p><a href="{$link_priceinquiry}">{txt key=TEXT_XT_PRICEINQUIRY_ASK}</a></p>{/if}{/if}
{if $shipping_status}<p class="shippingtime">{txt key=TEXT_SHIPPING_STATUS} {$shipping_status}</p>{/if}

{hook key=product_info_tpl_before_cart}
{if $allow_add_cart eq 'true'}
{form type=form name=product action='dynamic' link_params=getParams method=post}
{form type=hidden name=action value=add_product}
{form type=hidden name=product value=$products_id}
<div style="clear:both;"></div>

<div class="addtobasket">
<table border="0" cellspacing="0" cellpadding="2">

<tr><td colspan="2">{$products_information}</td></tr>
<tr>
<td style="width:100%">{form type=text name=qty value=1 style='width:50px;'}</td>
<td>{button text=$smarty.const.BUTTON_ADD_CART file='button_in_cart.gif' type='form' btn_template='tpl_button_2.gif' space_left='25'}</td>
</tr>
</table>
</div>

{form type=formend}
{/if}
{hook key=product_info_tpl_cart}
</div>
</div>
</div>

{hook key=product_info_tpl_before_cart}
{if $allow_add_cart eq 'true'}
{form type=form name=product action='dynamic' link_params=getParams method=post}
{form type=hidden name=action value=add_product}
{form type=hidden name=product value=$products_id}
<div style="clear:both;"></div>
{if $products_fsk18=='1'}
<ul class="info_error">
<li class="infoError">{txt key=TEXT_PRODUCTS_FSK18_NOTE}</li>
</ul>
{/if}
<div id="more_image">
{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"><div class="small_image">{img img=$img_data.file type=m_thumb alt=$products_name}</div></a>
{/foreach}
{/if}
{box name=xt_cliplister type=user}
{if $media_files !=''}
<br />
{include file="$selected_template/xtCore/pages/files/product_public_files.html"}
{/if}
</div>
<div style="clear:both;"></div>

{form type=formend}
{/if}
{hook key=product_info_tpl_cart}

</div>
<div style="clear:both;"></div>
<br />
<div id="productinfodetail">
{if $products_description !=''}
<div id="productinfo_desc">
<h2>{txt key=TEXT_PRODUCTS_DESCRIPTION}</h2>
{$products_description}
</div>
{/if}
</div>
<br>

<div id="socialshareprivacy"></div>
<div class="line"></div>
{hook key=product_info_tpl}

<div class="line"></div>

[/HTML]

Link to comment
Share on other sites

Archived

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

×
  • Create New...