product_detailed.tpl.html
{* product detailed information view *}
<script type="text/javascript">
function urlcrt()
{literal}
{
{/literal}
return "./add2cart/{$product_info[14]}&opions=1";
{literal}
}
{/literal}
</script>
{literal}
<script language='JavaScript'>
function GetNewPrice(id,sel)
{
{/literal}
priceid='sprice'+id;
vnewprice='vnewprice'+id;
snewpic="{$product_info[5]}";
snewpic_B="{$product_info[9]}";
summ=Math.round(document.getElementById(priceid).value*100)/100;
product_option_Class="product_option_"+id;
product_option_id="product_option["+id+"]";
var array_po=getElementsByClass(product_option_Class);
for (var oi=0; oi<array_po.length; oi++)
{literal}
{
product_option_id_i=product_option_id+"["+(oi+1)+"]";
ps=document.getElementById(product_option_id_i).value.split(':')[1];
if (!ps) ps=0;
summ +=Math.round(ps*100)/100;
}
pct=document.getElementById(product_option_id_i).value.split(':')[2];
if (pct)
{
snewpic=pct+'.jpg';
snewpic_B=pct+'-B.jpg';
}
idsel='./products_pictures/'+snewpic;
idsel_B='./products_pictures/'+snewpic_B;
if (pct)
{
document.getElementById('adp'+id).href=idsel_B;
document.getElementById('dp'+id).src=idsel;
}
{/literal}
cur={$smarty.const.CURRENCY_val};
cur=Math.round(cur*1000)/1000;
summ=Math.round((summ/cur)*100)/100;
summ=currencyFormat(summ,0.01);
document.getElementById(vnewprice).innerHTML=summ;
{literal}
}
</script>
<style>
a.thumb_img {
text-decoration: none;
}
a.thumb_img img {
border: 1px solid #DDDDDD;
margin-bottom: 3px;
height: 70px;
width: 70px;
}
</style>
{/literal}
{if $product_info ne NULL}
<div class="top">
{if $smarty.session.access==3}
<a style="float: right;" id="iframe" href="admin.php?dpt=catalog&sub=products_edit&productID={$product_info[11]}" title="{$smarty.const.ADMIN_EDIT}"><img src="./images/backend/edit.png"></a>
{/if}
</div>
<div class="middle gallery"> <h1>{* $selected_category[1] *}{$product_info[32]}</h1>
<div style="width: 100%; margin-bottom: 30px;">
<table id="products" style="width: 100%; border-collapse: collapse; vertical-align: top;">
<tr>
<td style="text-align: center; width: 250px; vertical-align: top;">
{if $product_info[5] || $p_default}
<a href="./products_pictures/{if $p_default}{$p_default}-B.jpg{else}{$product_info[9]}{/if}" class="thickbox" id="adpdp{$product_info[11]}"><img src="./products_pictures/{if $p_default}{$p_default}.jpg{else}{$product_info[5]}{/if}" style="margin-bottom: 3px; border: 1px solid #DDDDDD;width: 250px;" alt="{$product_info[1]}" id="dp{$product_info[11]}" /></a><br />
<a href="./products_pictures/{if $p_default}{$p_default}-B.jpg{else}{$product_info[9]}{/if}" rel="example_group" class="thickbox"><span style="font-size: 11px;">{$smarty.const.ENLARGE_PICTURE}</span></a>
{else}
<img src="./products_pictures/nophoto.jpg" id="dp{$product_info[11]}" style="margin-bottom: 3px;width: {$smarty.const.RESIZE_NORMAL_X}px; height: {$smarty.const.RESIZE_NORMAL_Y}px" alt="{$product_info[1]}" />
{/if}
{* more image *}
{if $product_thumb[0] ne NULL}
<div style="display: inline-block;">
{section name=i loop=$product_thumb}
<div style="display: inline-block; float: left; text-align: center; margin-left: 5px; margin-right: 5px; margin-bottom: 10px;">
{*<p>{$product_desc[i]}</p>*}
<a href="./products_thumb/{$product_thumb[i]}" rel="example_group" title="{$product_desc[i]}" class="thumb_img">
<img src="./products_thumb/P_{$product_thumb[i]}" alt="{$product_desc[i]}" />
</a><br />
</a>
</div>
{/section}
</div>
{/if}
</td>
<td style="padding-left: 15px; width: 296px; vertical-align: top;">
<table style=" width: 100%; vertical-align: top;">
<tr>
<td style="vertical-align: top"><b>Производитель:</b></td>
<td><a href="./{$product_info[19]}">{$product_info[20]}</a><br /> </td>
</tr>
<tr>
<td style="vertical-align: top"><b>{$smarty.const.STRING_MODEL}:</b></td>
<td>{$product_info[1]}<br /> </td>
</tr>
{* product code *}
{if $product_info[12] ne ""}
<tr>
<td style="vertical-align: top"><b>{$smarty.const.ADMIN_PRODUCT_CODE}: </b></td>
<td>[{$product_info[12]}]<br /> </td>
</tr>
{/if}
{if $product_info[8] > 0} {* rating *}
<tr>
<td style="vertical-align: top"><b>{$smarty.const.ADMIN_PRODUCT_RATING}:</b></td>
<td>{section name=i loop=5}{if $smarty.section.i.index<$product_info[3]}<img src="./images/icon_bes.png" alt="{$smarty.section.i.index}" />{else}<img src="./images/black_star.png" alt="{$smarty.section.i.index}" />{/if}{/section} <br /> </td>
</tr>
{/if}
{assign var="id" value=$product_info[11]}
{assign var="p" value=0}
{foreach from=$options2 item=option key=key name=option}
<tr>
<td style="vertical-align: top">
<b>{$option.name}:</b>
</td>
<td>
{if count($option.var)>1}
{assign var="i" value=$i+1}
{assign var="new_price" value="0"}
<select class="product_option_{$option.productID}" onChange="GetNewPrice({$option.productID},this)" name="product_option_{$option.productID}_{$key}" id="product_option[{$option.productID}][{$i}]">
{*<option rel="0" value="">Не определено</option>*}
{foreach from=$option.var item=var}
<option {if $var.default} {assign var=p value=$p+$var.price_surplus} {assign var="newfoto" value=$var.picture} selected{/if} rel="0" value="{$var.variantID}:{$var.price_surplus}:{$var.picture}">{$var.name}{if $var.price_surplus!=0} {assign var="new_price" value="1"} ({if $var.price_surplus>0}+{/if}{math equation="x/y" x=$var.price_surplus y=$smarty.const.CURRENCY_val format="%.2f"}){/if}</option>
{/foreach}
</select>
{else}
{$option.var.0.name}
{/if}
<br>
</td>
</tr>
{/foreach}
<tr>
<td style="vertical-align: top" colspan="2">
<div {if !$new_price} style="display:none;" {/if}><br />
{$smarty.const.STRING_NEWPRICE}: <font color="red"><h3> {$smarty.const.CONF_CURRENCY_ID_LEFT}<font id="vnewprice{$id}" >{math equation="x+y/z" x=$product_info[4] y=$p z=$smarty.const.CURRENCY_val format="%.2f" assign="newsum"}{$newsum|print_price}</font>{$smarty.const.CONF_CURRENCY_ID_RIGHT} руб. </h3></font>
</div >
</td>
</tr>
<input type="hidden" id="sprice{$id}" value="{$product_info.real}">
<tr>
<td style="vertical-align: top"><b>{$smarty.const.IN_STOCK}:</b></td>
<td>{if $product_info[6] > 0}{$smarty.const.PRODUCT_IN_STOCK}{else}<font style="color: #900">{$product_info[31]}</font>{/if}<br /> </td>
</tr>
{if $product_info[10] > 0 && $product_info[10] > $product_info[4] && $product_info[4] > 0}
<tr>
<td style="vertical-align: top"><b>{$smarty.const.LIST_PRICE}: </b></td>
<td><font class="list_price">{$product_info[25]}</font></td>
</tr>
{/if}
<tr>
<td style="vertical-align: top"><b>{$smarty.const.TABLE_PRODUCT_COST}:</b></td>
<td><font class="pprice" ><span id="sum">{if $product_info[4]>0}{$product_info[24]}{else}Звоните менеджеру, чтобы узнать цену{/if} </span></font><font color="red">руб.</font></td>
</tr>
{if $product_info[10] > 0 && $product_info[10] > $product_info[4] && $product_info[4] > 0}
<tr>
<td style="vertical-align: top"> </td>
<td> </td>
</tr>
<tr>
<td style="vertical-align: top"><font class="you_save">{$smarty.const.YOU_SAVE}:</font> </td>
<td><font class="you_save_price">{$product_info[26]} ({$product_info[27]}%)</font></td>
</tr>
{/if}
</table>
<br />
{if $product_info[28] eq 1}
<div class="prod_div">
<div style="text-align: center;">
<a onclick="$('#product').submit();" id="tocart_{$product_info[11]}" href="./add2cart/{$product_info[14]}&modal=1" class="thickbox button"><img src="http://xn--h1afew7c.xn--p1ai/zakaz.jpg"></a></a>
</div>
</div>
{/if}
<br />
<script type="text/javascript" src="//yandex.st/share/share.js" charset="utf-8"></script>
<div class="yashare-auto-init" data-yashareL10n="ru" data-yashareType="button" data-yashareQuickServices="yaru,vkontakte,facebook,twitter,odnoklassniki,moimir"></div>
</td>
</tr>
</table>
</div>
{if $product_info[2]}
<div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px; text-align: justify;">
{$product_info[2]}
</div>
{/if}
<br />
<table style="width: 100%;">
<tr>
<td style="width: 50%; vertical-align: top;">
{if $accompany}
<div class="page">
<div class="heading">{$smarty.const.STRING_RELATED_ITEMS}</div>
<div style="background: #F7F7F7; border: 1pxsolid #DDDDDD; padding: 5px; margin-bottom: 0px;">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
{section name=i2 loop=$accompany}
<td style="text-align: center;">
{if $accompany[i2][3]}
<a href="./{$accompany[i2][5]}"><img src="./products_pictures/{$accompany[i2][3]}" alt="{$accompany[i2][2]}" /></a>
<br />
{/if}
<a href="./{$accompany[i2][5]}">{$accompany[i2][2]}</a>
</td>
{/section}
</tr>
</table>
</div>
</div>
{/if}
</td>
</tr>
</table>
</div>
{/if}
{include file="product_last_view.html"}
{include file="last_ordered.tpl.html"}