А они и так не меняются. Просто нажимаешь на картинку и срабатывает скрипт. Причем когда магазин стоял на денвере, то при нажатии картинка сначала перемещалась, а потом, при нажатии, увеличивалась. Поставил на хостинг все работает путем - увеличивается сразу.
Залил на хост, AGAVA.
Увеличивает без проблем. Но доп. фоты переходят на фоты главной и только тогда увеличиваются... Гляньте где запорол
Что делать? вот код:
{* product detailed information view *}
{if $product_info ne NULL}
{if !$printable_version}<script type="text/javascript" src="openimg/highslide.packed.js"></script>
<script type="text/javascript">
<!--
hs.graphicsDir = 'openimg/';
hs.outlineType = 'rounded';
window.onload = function() {literal}{
hs.preloadImages(1);
}
{/literal}
//-->
</script>
<table cellpadding=3 border=0 width=100%>
<tr>
{if $selected_category[3]}
<td rowspan=2 valign=top width="1%">
<img src="products_pictures/{$selected_category[3]}" alt="{$selected_category[1]}">
</td>
{/if}
<td width="70%">
<a href="index.php" class="cat">{$smarty.const.LINK_TO_HOMEPAGE}</a>
{section name=i loop=$product_category_path}
{if $product_category_path
.categoryID != 1}
/ <a class="cat" href="index.php?categoryID={$product_category_path.categoryID}">{$product_category_path.name}</a>
{/if}
{/section}
</td>
<td align=right width="30%"> {* printable version link *}
<table>
<tr><td><a href="javascriptpen_printable_version('printable.php?productID={$product_info.productID}');"><img src="images/printer-icon.gif" border=0 alt="{$smarty.const.STRING_PRINTABLE_VERSION}"></a></td>
<td><a href="javascriptpen_printable_version('printable.php?productID={$product_info.productID}');">{$smarty.const.STRING_PRINTABLE_VERSION}</a></td>
</tr>
</table>
</td>
</tr>
</table>
{/if}
<p>
<table width=100% border=0 cellspacing=1 cellpadding=2>
<tr>
<td width=1% align=center valign=top border=0>
{if $product_info.picture}
{if $product_info.big_picture}
{if !$printable_version}<a class="olive" href="products_pictures/{$product_info.big_picture}" class="highslide" onclick="return hs.expand(this, {literal}{captionId: 'caption1'}{/literal})"><img id="thumb1" border="0" src="products_pictures/{$product_info.picture}" alt="{$product_info.name}" class="spacel"></a>{/if}</a>{if !$printable_version}<br>
<table><tr><td><img src="images/enlarge.gif"></td><td>
<a class="olive" href="products_pictures/{$product_info.big_picture}" onclick="return hs.expand(this, {literal}{thumbnailId: 'thumb1',captionId: 'caption1'}{/literal})" style="font-size: 90%;">{$smarty.const.ENLARGE_PICTURE}</a>
</td></tr></table>
{/if}
{else}
<img src="products_pictures/{$product_info.picture}" border=0 alt="{$product_info.name|escape:'html'}">
{/if}
{else}
{if $product_info.thumbnail}
{if $product_info.big_picture}
{if !$printable_version}<a class="olive" href="products_pictures/{$product_info.big_picture}" class="highslide" onclick="return hs.expand(this, {literal}{captionId: 'caption1'}{/literal})"><img id="thumb1" border="0" src="products_pictures/{$product_info.thumbnail}" alt="{$product_info.name}" class="spacel"></a>{/if}</a>{if !$printable_version}<br>
<table><tr><td><img src="images/enlarge.gif"></td><td>
<a class="olive" href="products_pictures/{$product_info.big_picture}" onclick="return hs.expand(this, {literal}{thumbnailId: 'thumb1',captionId: 'caption1'}{/literal})" style="font-size: 90%;">{$smarty.const.ENLARGE_PICTURE}</a>
</td></tr></table>
{/if}
{else}
<<img src="products_pictures/{$product_info.picture}" border=0 alt="{$product_info.name|escape:'html'}">
{/if}
{/if}
{/if}
{if $all_product_pictures}
<p>{$smarty.const.ADMIN_PHOTOS}:<br><table cellpadding="3">
{section name=i loop=$all_product_pictures}
{if $smarty.section.i.index % 2 == 0}<tr>{/if}
<td><a href="index.php?productID={$product_info.productID}&picture_id={$all_product_pictures_id}"><img src="products_pictures/{$all_product_pictures}" border=0></a></td>
{if ($smarty.section.i.index+1) % 2 == 0}</tr>{/if}
{/section}
</table>
{/if}
</td>
<td valign=top width=99%>
<table width=100% border=0 cellpadding=4>
<tr>
<td valign=top rowspan="2">
<h1>{$product_info.name}</h1>
{if $product_info.customer_votes > 0} {* rating *}
<p>
<table cellspacing="0" cellpadding="0">
<tr>
{section name=i loop=5}
<td>
{if $smarty.section.i.index<$product_info.customers_rating}
<img src="images/redstar_big.gif">
{else}
<img src="images/blackstar_big.gif">
{/if}
</td>
{/section}
</tr><tr>
<td colspan=5>({$smarty.const.VOTES_FOR_ITEM_STRING}: {$product_info.customer_votes})</td>
</tr>
</table>
{/if}
{if $product_info.eproduct_filename ne ""}
{$smarty.const.PRODUCT_IS_DOWNLOADABLE} ({$product_info.eproduct_filesize})
{/if}
{if !$printable_version}
<p>
<a href="index.php?productID={$product_info.productID}&discuss=yes">{$smarty.const.DISCUSS_ITEM_LINK}</a>
({$product_reviews_count} {$smarty.const.POSTS_FOR_ITEM_STRING})
<br>
<br>
{/if}
</td>
<td align=right> {* add to cart *}
{if !$printable_version}
<form action="index.php?productID={$product_info.productID}"
method=post name="HiddenFieldsForm">
<p align="center">{if ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) &&
( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
<input name='cart' type=image src="images/cart_big.gif"
alt="{$smarty.const.ADD_TO_CART_STRING}">
{else}
{/if}
{counter name='select_counter_hidden' start=0 skip=1 print=false}
{section name=i loop=$product_extra}
{if $product_extra.option_type eq 1}
{section name=s loop=$product_extra.option_show_times}
<input type=hidden
name='option_select_hidden_{counter name=select_counter_hidden}'
value='1'>
{/section}
{/if}
{/section} </p>
</form>
{/if}
</td>
</tr>
<tr>
<td align=right valign=top>
<p align="center">{if $currencies_count ne 0}
{* show list price? *}
{if $product_info.list_price > 0 &&
$product_info.list_price > $product_info.Price &&
$product_info.Price > 0}
{$smarty.const.LIST_PRICE}:
<font color=brown>
<strike>{$product_info.list_priceWithUnit}</strike>
</font>
<br>
{/if}
<b>{$smarty.const.CURRENT_PRICE}:
<font class=cat color=red id='currentPrice'>
{if $product_info.Price <= 0}
<span lang="ru">ЗВОНИТЕ</span>
{else}
{$product_info.PriceWithUnit}
{/if}
</font>
</b>
{* you save *}
{if $product_info.list_price > 0 &&
$product_info.list_price > $product_info.Price &&
$product_info.Price > 0}
<br>
{$smarty.const.YOU_SAVE}:
<font color=brown>
{$product_info[14]} ({$product_info[15]}%)
</font>
<br>
{/if}
{/if}<br> <br>
</td>
</tr>
<tr>
<td>
</td>
<td rowspan=3 align=center valign="top">
{if !$printable_version}
<Table><tr><td align=center>
<form name=VotingForm action='index.php' method=GET>
<table border=0 cellspacing=1 cellpadding=2 bgcolor=#{$smarty.const.CONF_MIDDLE_COLOR}>
<tr>
<td align=center>{$smarty.const.VOTING_FOR_ITEM_TITLE}</td>
</tr>
<tr bgcolor=white>
<td>
<input type="radio" name="mark" value="5" checked>{$smarty.const.MARK_EXCELLENT}<br>
<input type="radio" name="mark" value="3.8">{$smarty.const.MARK_GOOD}<br>
<input type="radio" name="mark" value="2.5">{$smarty.const.MARK_AVERAGE}<br>
<input type="radio" name="mark" value="1">{$smarty.const.MARK_POOR}<br>
<input type="radio" name="mark" value="0.1">{$smarty.const.MARK_PUNY}
</td>
</tr>
</table>
<br>
<input type="hidden" name="productID" value="{$product_info.productID}">
<input type="hidden" name="vote" value="yes">
<input type="submit" value="{$smarty.const.VOTE_BUTTON}">
</form>
</Table>
{/if}
</td>
</tr>
<tr>
<td>
{* in stock info *}
{if $smarty.const.CONF_CHECKSTOCK == '1'}
{$smarty.const.IN_STOCK}:
<b>
{if $product_info.in_stock > 0}
{if $smarty.const.CONF_EXACT_PRODUCT_BALANCE}
{$product_info.in_stock}
{else}
{$smarty.const.ANSWER_YES}
{/if}
{else}
<font color=red>{$smarty.const.ANSWER_NO}</font>
{/if}
</b>
<br>
{/if}
{if $product_info.shipping_freightUC}
{$smarty.const.ADMIN_SHIPPING_FREIGHT}:
<font color=brown>{$product_info.shipping_freightUC}</font>
<br>
{/if}
{if $product_info.min_order_amount > 1}
{$smarty.const.STRING_MIN_ORDER_AMOUNT}: {$product_info.min_order_amount}
{$smarty.const.STRING_ITEM}
<br>
{/if}
{if $product_info.weight > 0}
{$smarty.const.ADMIN_PRODUCT_WEIGHT}: {$product_info.weight} {$smarty.const.CONF_WEIGHT_UNIT}
{/if}
</td>
</tr>
<tr>
<td>
<form action="index.php?productID={$product_info.productID}" method=post
name="MainForm">
{* extra parameters *}
<p>
<table cellpadding="4">
{counter name='select_counter' start=0 skip=1 print=false assign='select_counter_var'}
{section name=i loop=$product_extra}
{if $product_extra.option_type eq 0 }
<tr bgcolor="{if $smarty.section.i.index % 2 == 0}#{$smarty.const.CONF_LIGHT_COLOR}{else}white{/if}">
<td valign="top">
{$product_extra.name}:
</td>
<td>
<b>{$product_extra.option_value}</b><br>
</td>
</tr>
{else}
{counter name='option_show_times' start=0 skip=1 print=false}
{section name=k loop=$product_extra.option_show_times}
<tr bgcolor="{if $smarty.section.i.index % 2 == 0}#{$smarty.const.CONF_LIGHT_COLOR}{else}white{/if}">
<td>
{$product_extra.name}{if $product_extra.option_show_times > 1 }
({counter name=option_show_times}{else}:{/if}
</td>
<td>
{counter name=select_counter}
{if $smarty.section.k.index == 0}
<select name='option_select_{$select_counter_var}'
onchange='JavaScript:GetCurrentCurrency();'>
{section name=j loop=$product_extra.values_to_select}
{if $product_extra.values_to_select[j].variantID eq $product_extra.variantID}
<option value='{$product_extra.values_to_select[j].price_surplus}:{$product_extra.values_to_select[j].variantID}' selected>
{else}
<option value='{$product_extra.values_to_select[j].price_surplus}:{$product_extra.values_to_select[j].variantID}'>
{/if}
{$product_extra.values_to_select[j].option_value}
</option>
{/section}
</select>
{else}
<select name='option_select_{$select_counter_var}'
onchange='JavaScript:GetCurrentCurrency();'>
<option value='0:-1'>{$smarty.const.NOT_DEFINED}</option>
{section name=j loop=$product_extra.values_to_select}
<option value='{$product_extra.values_to_select[j].price_surplus}:{$product_extra.values_to_select[j].variantID}'>
{$product_extra.values_to_select[j].option_value}
</option>
{/section}
</select>
{/if}
</td>
</tr>
{/section}
{/if}
{/section}
</table>
{if $select_counter_var != 0}
{if $product_info.Price > 0}
<b>{$smarty.const.CURRENT_PRICE_OPTION}:</br>
{/if}
<input type=hidden value="{php}echo(getPriceUnit());{/php}"
name="priceUnit">
{if $product_info.Price <= 0}
<input type=hidden value="" id="optionPrice">
{else}
<input type=text value=""
class="totalPrice"
readonly
id="optionPrice" >
{/if}
{literal}
<script langauge='JavaScript'>
document.MainForm.optionPrice.readOnly = true;
function _formatPrice( _price )
{
_pointIndex = -1;
for( i=0; i< _price.length; i++ )
if ( _price.charAt(i) == '.' )
{
_pointIndex = i;
break;
}
if ( _pointIndex == -1 )
_price = _price + ".00";
else if ( _price.length-1 - _pointIndex == 1 )
_price = _price + "0";
_res = "";
i=0;
for( i=_price.length-1; i >= 0; i-- )
{
if ( _price.charAt(i) == '.' )
break;
else
_res = _price.charAt(i) + _res;
}
_res = "." + _res;
i--;
_digitCounter = 0;
for( ; i>=0; i-- )
{
_digitCounter ++;
_res = _price.charAt(i) + _res;
if ( _digitCounter == 3 && i != 0 )
{
_res = "," + _res;
_digitCounter = 0;
}
}
return _res;
}
function GetCurrentCurrency()
{
{/literal}
_selectionCount={$select_counter_var};
_sum = {$product_info.PriceWithOutUnit};
{counter name='select_counter2' start=1 skip=1 print=false
assign='select_counter_var2'}
{section name=i loop=$product_extra}
{section name=k loop=$product_extra.option_show_times}
_value =
document.MainForm.option_select_{$select_counter_var2}.value;
price_surplus = ( _value.split(":") )[0];
_sum += new Number( price_surplus );
variantID = ( _value.split(":") )[1];
document.HiddenFieldsForm.option_select_hidden_{$select_counter_var2}.value =
variantID;
{counter name=select_counter2}
{/section}
{/section}
_sumStr = new String(_sum);
_commaIndex = _sumStr.indexOf(".");
if ( _commaIndex == -1 )
_sumStr = _sum;
else
_sumStr = _sumStr.substr(0, _commaIndex + 3);
{php}
echo("locationPriceUnit=".getLocationPriceUnit().";\n");
echo("priceUnit='".getPriceUnit()."';\n");
{/php}
_sumStr = _formatPrice( _sumStr );
if ( locationPriceUnit )
document.MainForm.optionPrice.value =
_sumStr + document.MainForm.priceUnit.value;
else
document.MainForm.optionPrice.value =
document.MainForm.priceUnit.value + _sumStr;
{literal}
}
{/literal}
GetCurrentCurrency();
</script>
{/if}
</form>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=2>
<table border=0>
<tr>
<td height="100%" valign=top bgcolor="">
{$product_info.description}
</td>
</tr>
</table>
</td>
</tr>
{* related products *}
{if !$printable_version}
{if $product_related_number > 0}
<tr>
<td colspan=2>
<p>
<u>
{$smarty.const.STRING_RELATED_ITEMS}:
</u>
<p>
<table border=0>
{section name=i loop=$product_related}
<tr>
<td align="center">
{if $product_related.pictures.default.thumbnail}
<a href="index.php?productID={$product_related[0]}">
<img border="0" src="./products_pictures/{$product_related.pictures.default.thumbnail}" />
</a>
{/if}
</td>
<td>
<a href="index.php?productID={$product_related[0]}">
{$product_related[1]}
</a>
</td>
<td>
<nobr> <font color=brown>{$product_related[2]}</font></nobr>
</td>
</tr>
{/section}
</table>
</td>
</tr>
{/if}
<tr>
<td colspan=2>
<p class="pageSeparator">
<p>
<a name="inquiry"></a>
{if $sent eq NULL}
<h4>{$smarty.const.STRING_FEEDBACK_PRODUCT_HEADER|replace:"[product_name]":$product_info.name}</h4>
<p>{$smarty.const.STRING_FEEDBACK_PRODUCT_DESCRIPTION}</font>
{if $error ne NULL}
<p><b><font color=red>{$smarty.const.FEEDBACK_ERROR_FILL_IN_FORM}</font></b>
{/if}
<p>
<form name="form1" method="post" action="index.php#inquiry">
{$smarty.const.FEEDBACK_CUSTOMER_NAME} и телефон:<br>
<input name="customer_name" type="text" size="40" value="{$customer_name|replace:"\"":"""}"><br>
{$smarty.const.CUSTOMER_EMAIL}<br>
<input name="customer_email" type="text" size="40" value="{$customer_email|replace:"\"":"""}">
<p>
<input name="message_subject" type="hidden" size="50" value="{$product_info.name|replace:"\"":"""}">
<p>{$smarty.const.STRING_FEEDBACK_PRODUCT_INQUIRY_EXPLANATION} {$product_info.name}:<br>
<textarea name="message_text" cols="50" rows="10">{$message_text|replace:"<":"<"}</textarea>
<p>
<input type="submit" value="OK">
<input type="hidden" name="request_information" value="yes">
<input type="hidden" name="productID" value="{$product_info.productID}">
</p>
</form>
{else}
<p>
<b><font class=faq color=blue>{$smarty.const.FEEDBACK_SENT_SUCCESSFULLY}</font></b>
{/if}
</td>
</tr>
{/if}
</table>
{/if}