X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Thickbox 2.0 implementation (https://forum.x-cart.com/showthread.php?t=27058)

MattUK 01-14-2007 06:55 AM

Re: Thickbox 2.0 implementation
 
Anyone have any ideas on this guys?

ezi designs 01-14-2007 11:32 AM

Re: Thickbox 2.0 implementation
 
I would post up your file so we can take a look. Insure also you have uploaded the thickbox folder to SKIN1 and not the root

MattUK 01-14-2007 01:11 PM

Re: Thickbox 2.0 implementation
 
Yep, the folder is in the correct location, the code excerpt is in my first post.

ezi designs 01-16-2007 06:49 AM

Re: Thickbox 2.0 implementation
 
I can see where you have got it wrong. If you post your whole .tpl file and not just part of it i can edit it for you to what it should be.

tron 01-16-2007 08:00 AM

Re: Thickbox 2.0 implementation
 
I am looking into how it is possible to change the size of the image to 100%.

I have been modificate the CSS that followed but still the same.

ezi designs 01-16-2007 09:49 AM

Re: Thickbox 2.0 implementation
 
Yes i would love to know how to enlarge the image also. Not a lot, well not 100% for sure, as it may take a time to load !

NightFire 01-16-2007 09:52 AM

Re: Thickbox 2.0 implementation
 
Yes, was also looking for that solution. Heard that it can be set at the .js file.
But till now haven't figured it out yet. If someone has a solution, It's highly appreciated.

MattUK 01-18-2007 03:22 AM

Re: Thickbox 2.0 implementation
 
This is my product.tpl

{* $Id: product.tpl,v 1.147.2.8 2006/08/02 05:39:12 max Exp $ *}
{include file="main/include_js.tpl" src="main/popup_image.js"}
{if $active_modules.Special_Offers}
{include file="modules/Special_Offers/customer/product_offers_short_list.tpl" product=$product}
{/if}
{include file="form_validation_js.tpl"}
{if $product.product_type eq "C" && $active_modules.Product_Configurator}
{include file="modules/Product_Configurator/pconf_customer_product.tpl"}
{else}

<font class=product_grey_dark_lrg_bold>{$product.product title}</font><br>
<form name="orderform" method="post" action="cart.php?mode=add" onsubmit="javascript: return FormValidation();">
<table width="100%" border=0>
<tr>
<td class="PImgBox" rowspan="2">
{if $active_modules.Detailed_Product_Images ne "" && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'}
{include file="modules/Detailed_Product_Images/popup_image.tpl"}
{else}
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"}&nbsp;
{/if}
{if $active_modules.Magnifier ne "" && $config.Magnifier.magnifier_image_popup eq 'Y' && $zoomer_images ne '' && $js_enabled eq 'Y'}
{include file="modules/Magnifier/popup_magnifier.tpl"}
{/if}
</td>
<td valign="top" width="100%" border=0>

<table width="100%" cellpadding="0" cellspacing="0">
{if $active_modules.Subscriptions ne "" and $subscription}
{include file="modules/Subscriptions/subscription_info.tpl"}
{else}
<tr>
<td valign="top">
{if $product.taxed_price ne 0 || $variant_price_no_empty}
<font class="price_lrg_bold"><span id="product_price">{include file="currency.tpl" value=$product.taxed_price}</span></font><font class="MarketPrice"> <span id="product_alt_price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</span></font>
{if $product.taxes}<br />{include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if}
{else}
<input type="text" size="7" name="price" />
{/if}
</td>
<td align=right>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
</tr>
{/if}

<tr>
<td height="25" width="30%">{$lng.lbl_quantity}{if $product.min_amount gt 1}<br /><font class="ProductDetailsTitle">{$lng.txt_need_min_amo unt|substitute:"items":$product.min_amount}</font>{/if}</td>
<td>
{if $config.General.unlimited_products eq "N" and ($product.avail le 0 or $product.avail lt $product.min_amount) and $variants eq ''}
<script type="text/javascript" language="JavaScript 1.2">
<!--
var min_avail = 1;
var avail = 0;
var product_avail = 0;
-->
</script>
<b>{$lng.txt_out_of_stock}</b>
{else}
{if $config.General.unlimited_products eq "Y"}
{assign var="mq" value=$config.Appearance.max_select_quantity}
{else}
{math equation="x/y" x=$config.Appearance.max_select_quantity y=$product.min_amount assign="tmp"}
{if $tmp<2}
{assign var="minamount" value=$product.min_amount}
{else}
{assign var="minamount" value=1}
{/if}
{math equation="min(maxquantity+minamount, productquantity+1)" assign="mq" maxquantity=$config.Appearance.max_select_quantity minamount=$minamount productquantity=$product.avail}
{/if}
{if $product.distribution eq "" and !($active_modules.Subscriptions ne "" and $subscription)}
{if $product.min_amount le 1}
{assign var="start_quantity" value=1}
{else}
{assign var="start_quantity" value=$product.min_amount}
{/if}
{if $config.General.unlimited_products eq "Y"}
{math equation="x+y" assign="mq" x=$mq y=$start_quantity}
{/if}
<script type="text/javascript" language="JavaScript 1.2">
<!--
var min_avail = {$start_quantity|default:1};
var avail = {$mq|default:1}-1;
var product_avail = {$product.avail|default:"0"};
-->
</script>
<select id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_wholesale(this.value);"{/if}>
{section name=quantity loop=$mq start=$start_quantity}
<option value="{%quantity.index%}" {if $smarty.get.quantity eq %quantity.index%}selected{/if}>{%quantity.index%}</option>
{/section}
</select>
{else}
<script type="text/javascript" language="JavaScript 1.2">
<!--
var min_avail = 1;
var avail = 1;
var product_avail = 1;
-->
</script>
<font class="ProductDetailsTitle">1</font><input type="hidden" name="amount" value="1" /> {if $product.distribution ne ""}{$lng.txt_product_downloadable}{/if}
{/if}
{/if}
</td></tr>

{if $product.descr}
<tr>
<td colspan=2><br>{$product.descr}<br><br></td>
</tr>
{/if}

<tr>
<td width="30%"><span class="product_grey_dark_sml"><b>Product Code:</b></span></td>
<td nowrap="nowrap" id="product_code">{$product.productcode}</td>
</tr>

{if $active_modules.Product_Options ne ""}
{include file="modules/Product_Options/customer_options.tpl"}
{/if}

{if $product_wholesale ne ""}
<tr><td colspan="2">
{include file="customer/main/product_prices.tpl"}
<br /><br />
</td>
</tr>
{/if}

{if $active_modules.Feature_Comparison ne ""}
<tr><td colspan="2">
{include file="modules/Feature_Comparison/product_buttons.tpl"}
<br /><br />
</td>
</tr>
{/if}
<input type="hidden" name="mode" value="add" />
<input type="hidden" name="productid" value="{$product.productid}" />
<input type="hidden" name="cat" value="{$smarty.get.cat|escape:"html"}" />
<input type="hidden" name="page" value="{$smarty.get.page|escape:"html"}" />
</form>

{if $config.Appearance.send_to_friend_enabled eq 'Y'}
<tr>
<td colspan=2><br>
<span class="x_send_to" onClick="javascript: if (document.getElementById('send_to_friend').style.d isplay == 'none') document.getElementById('send_to_friend').style.di splay=''; else document.getElementById('send_to_friend').style.di splay='none'">Email a friend about this product</span>
<br>
<div id='send_to_friend' style='display: none'>
{include file="customer/main/send_to_friend.tpl"}
</div>
<br>
</td>
</tr>
{/if}
</table>

</td>
</tr>
</table>

{if $product.fulldescr}
{$product.fulldescr}
{/if}

{/if}


{if $active_modules.Magnifier ne "" && ($config.Magnifier.magnifier_image_popup ne 'Y' || $js_enabled ne 'Y')}
<p />
{include file="modules/Magnifier/product_magnifier.tpl" productid=$product.productid}
{/if}
{if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')}
<p />
{include file="modules/Detailed_Product_Images/product_images.tpl" }
{/if}
{if $active_modules.Upselling_Products ne ""}
<p />
{include file="modules/Upselling_Products/related_products.tpl" }
{/if}
{if $active_modules.Recommended_Products ne ""}
<p />
{include file="modules/Recommended_Products/recommends.tpl" }
{/if}
{if $active_modules.Customer_Reviews ne ""}
<p />
{include file="modules/Customer_Reviews/vote_reviews.tpl" }
{/if}
{if $active_modules.Product_Options ne '' && $product_options ne ''}
<script type="text/javascript" language="JavaScript 1.2">
<!--
check_options();
-->
</script>
{/if}

ranger82nd 01-18-2007 04:58 AM

Re: Thickbox 2.0 implementation
 
Quote:

Originally Posted by tron
I am looking into how it is possible to change the size of the image to 100%.

I have been modificate the CSS that followed but still the same.


edit thickbox.js

Look for:
Code:

// Resizing large images - orginal by Christian Montoya edited by me.
                        var pagesize = TB_getPageSize();
                        var x = pagesize[0] - 150;
                        var y = pagesize[1] - 150;


To make the images larger change the var x and var y variables to a smaller number (>150)
To make the images smaller change the var x and var y variables to a larger number (<150)

ezi designs 01-18-2007 05:02 AM

Re: Thickbox 2.0 implementation
 
Try this

{* $Id: product.tpl,v 1.147.2.8 2006/08/02 05:39:12 max Exp $ *}
{include file="main/include_js.tpl" src="main/popup_image.js"}
{if $active_modules.Special_Offers}
{include file="modules/Special_Offers/customer/product_offers_short_list.tpl" product=$product}
{/if}
{include file="form_validation_js.tpl"}
{if $product.product_type eq "C" && $active_modules.Product_Configurator}
{include file="modules/Product_Configurator/pconf_customer_product.tpl"}
{else}
<font class=product_grey_dark_lrg_bold>{$product.product title}</font><br>
<form name="orderform" method="post" action="cart.php?mode=add" onsubmit="javascript: return FormValidation();">
<table width="100%" border=0>
<tr>
<td class="PImgBox" rowspan="2">
{if $active_modules.Detailed_Product_Images ne "" && $config.Detailed_Product_Images.det_image_popup eq 'Y' && $images ne '' && $js_enabled eq 'Y'}
{include file="modules/Detailed_Product_Images/popup_image.tpl"}
{else}
{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.image_x image_y=$product.image_y product=$product.product tmbn_url=$product.tmbn_url id="product_thumbnail" type="P"}&nbsp;
{/if}
{include file="thickbox/thickbox_productpage.tpl" }
{*{if $active_modules.Magnifier ne "" && $config.Magnifier.magnifier_image_popup eq 'Y' && $zoomer_images ne '' && $js_enabled eq 'Y'}
{include file="modules/Magnifier/popup_magnifier.tpl"}
{/if}*}
</td>
<td valign="top" width="100%" border=0>
<table width="100%" cellpadding="0" cellspacing="0">
{if $active_modules.Subscriptions ne "" and $subscription}
{include file="modules/Subscriptions/subscription_info.tpl"}
{else}
<tr>
<td valign="top">
{if $product.taxed_price ne 0 || $variant_price_no_empty}
<font class="price_lrg_bold"><span id="product_price">{include file="currency.tpl" value=$product.taxed_price}</span></font><font class="MarketPrice"> <span id="product_alt_price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</span></font>
{if $product.taxes}<br />{include file="customer/main/taxed_price.tpl" taxes=$product.taxes}{/if}
{else}
<input type="text" size="7" name="price" />
{/if}
</td>
<td align=right>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}</td>
</tr>
{/if}
<tr>
<td height="25" width="30%">{$lng.lbl_quantity}{if $product.min_amount gt 1}<br /><font class="ProductDetailsTitle">{$lng.txt_need_min_amo unt|substitute:"items":$product.min_amount}</font>{/if}</td>
<td>
{if $config.General.unlimited_products eq "N" and ($product.avail le 0 or $product.avail lt $product.min_amount) and $variants eq ''}
<script type="text/javascript" language="JavaScript 1.2">
<!--
var min_avail = 1;
var avail = 0;
var product_avail = 0;
-->
</script>
<b>{$lng.txt_out_of_stock}</b>
{else}
{if $config.General.unlimited_products eq "Y"}
{assign var="mq" value=$config.Appearance.max_select_quantity}
{else}
{math equation="x/y" x=$config.Appearance.max_select_quantity y=$product.min_amount assign="tmp"}
{if $tmp<2}
{assign var="minamount" value=$product.min_amount}
{else}
{assign var="minamount" value=1}
{/if}
{math equation="min(maxquantity+minamount, productquantity+1)" assign="mq" maxquantity=$config.Appearance.max_select_quantity minamount=$minamount productquantity=$product.avail}
{/if}
{if $product.distribution eq "" and !($active_modules.Subscriptions ne "" and $subscription)}
{if $product.min_amount le 1}
{assign var="start_quantity" value=1}
{else}
{assign var="start_quantity" value=$product.min_amount}
{/if}
{if $config.General.unlimited_products eq "Y"}
{math equation="x+y" assign="mq" x=$mq y=$start_quantity}
{/if}
<script type="text/javascript" language="JavaScript 1.2">
<!--
var min_avail = {$start_quantity|default:1};
var avail = {$mq|default:1}-1;
var product_avail = {$product.avail|default:"0"};
-->
</script>
<select id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_wholesale(this.value);"{/if}>
{section name=quantity loop=$mq start=$start_quantity}
<option value="{%quantity.index%}" {if $smarty.get.quantity eq %quantity.index%}selected{/if}>{%quantity.index%}</option>
{/section}
</select>
{else}
<script type="text/javascript" language="JavaScript 1.2">
<!--
var min_avail = 1;
var avail = 1;
var product_avail = 1;
-->
</script>
<font class="ProductDetailsTitle">1</font><input type="hidden" name="amount" value="1" /> {if $product.distribution ne ""}{$lng.txt_product_downloadable}{/if}
{/if}
{/if}
</td></tr>
{if $product.descr}
<tr>
<td colspan=2><br>{$product.descr}<br><br></td>
</tr>
{/if}
<tr>
<td width="30%"><span class="product_grey_dark_sml"><b>Product Code:</b></span></td>
<td nowrap="nowrap" id="product_code">{$product.productcode}</td>
</tr>
{if $active_modules.Product_Options ne ""}
{include file="modules/Product_Options/customer_options.tpl"}
{/if}
{if $product_wholesale ne ""}
<tr><td colspan="2">
{include file="customer/main/product_prices.tpl"}
<br /><br />
</td>
</tr>
{/if}
{if $active_modules.Feature_Comparison ne ""}
<tr><td colspan="2">
{include file="modules/Feature_Comparison/product_buttons.tpl"}
<br /><br />
</td>
</tr>
{/if}
<input type="hidden" name="mode" value="add" />
<input type="hidden" name="productid" value="{$product.productid}" />
<input type="hidden" name="cat" value="{$smarty.get.cat|escape:"html"}" />
<input type="hidden" name="page" value="{$smarty.get.page|escape:"html"}" />
</form>
{if $config.Appearance.send_to_friend_enabled eq 'Y'}
<tr>
<td colspan=2><br>
<span class="x_send_to" onClick="javascript: if (document.getElementById('send_to_friend').style.d isplay == 'none') document.getElementById('send_to_friend').style.di splay=''; else document.getElementById('send_to_friend').style.di splay='none'">Email a friend about this product</span>
<br>
<div id='send_to_friend' style='display: none'>
{include file="customer/main/send_to_friend.tpl"}
</div>
<br>
</td>
</tr>
{/if}
</table>
</td>
</tr>
</table>
{if $product.fulldescr}
{$product.fulldescr}
{/if}
{/if}

{if $active_modules.Magnifier ne "" && ($config.Magnifier.magnifier_image_popup ne 'Y' || $js_enabled ne 'Y')}
<p />
{include file="modules/Magnifier/product_magnifier.tpl" productid=$product.productid}
{/if}
{if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')}
<p />
{include file="modules/Detailed_Product_Images/product_images.tpl" }
{/if}
{if $active_modules.Upselling_Products ne ""}
<p />
{include file="modules/Upselling_Products/related_products.tpl" }
{/if}
{if $active_modules.Recommended_Products ne ""}
<p />
{include file="modules/Recommended_Products/recommends.tpl" }
{/if}
{if $active_modules.Customer_Reviews ne ""}
<p />
{include file="modules/Customer_Reviews/vote_reviews.tpl" }
{/if}
{if $active_modules.Product_Options ne '' && $product_options ne ''}
<script type="text/javascript" language="JavaScript 1.2">
<!--
check_options();
-->
</script>
{/if}
{include file="thickbox/thickbox_include.tpl" }


All times are GMT -8. The time now is 04:43 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.