переделываем детальную страницу товара (product_detailed.tpl)

Тема в разделе "Shop-script", создана пользователем yalama, 19 фев 2009.

Модераторы: kadurinho
  1. yalama

    yalama Создатель

    Регистр.:
    25 янв 2009
    Сообщения:
    45
    Симпатии:
    2
    естественно изначально эта страница даётся нам в не очень презентабельном виде:

    Перейти по ссылке

    потому было решено сделать её более приятной для восприятия. ведь известно что чем меньше всякой инормации (адекватно не нужной), тем больше внимания клиент сосредотачивает на самом товаре:

    первый вариант:
    Перейти по ссылке
    как видите, убраны всякие оценевалки, голосовалки и имхолки. а описание товара объедененно в одну таблицу с ценой и корзиной.

    второй вариант:
    Перейти по ссылке
    здёсь есть всё что и в первом варианте, за исключением того что добавил дерево каталога сверху для быстрой навигации.

    оба варианта лежат Перейти по ссылке

    подходят для любого шаблона. чтобы использовать достаточно скопировать в папку \templates\frontend\название_шаблона

    пс: было бы интересно увидеть и ваши варианты ;)
     
  2. Дмитрий Кесаев

    Дмитрий Кесаев aka Zlobniy Babko

    Заблокирован
    Регистр.:
    10 май 2007
    Сообщения:
    1.332
    Симпатии:
    1.266
    Замечу минус по поводу 1 го варианта:
    Идет описание центровое, нет оценки товара, цена и кол-во в одной строке...

    [​IMG]

    Остальные скрины удалены, перезаливай на "радикал"

    ================================
    Выложу и свой вариант, может и пригодится кому-нить.

    [​IMG]

    Если что, сами редактируйте, мог и наворочить...
    Делал на коленке в 2007 году)))

    PHP:
    {* product detailed information view *}


    {if 
    $product_info ne NULL}
    {if !
    $printable_version}

    <
    table cellpadding=3 border=0 width=95%>
        <
    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[i].categoryID != 1}
                                <
    img src="arr-right-b1.gif"> <class="cat" href="index.php?categoryID={$product_category_path[i].categoryID}">{$product_category_path[i].name}</a>
                            {/if}
                        {/
    section}
            </
    td>

            
            


    {/if}
        </
    tr>
    </
    table>

     <
    table cellpadding="0" cellspacing="0" border="0" width="630">
      <
    tr><td height="8"  background="img/main_up1.gif"></td></tr>
      <
    tr>
      <
    td  align="center" style="border-left: Solid 1px #d5d5d5; border-right: Solid 1px #d5d5d5;">
      <
    table height="100%" cellpadding="0" cellspacing="0" border="0"  valign="top">
      <
    tr>
      <
    td width="219" style="border-bottom: Solid 1px #d5d5d5; border-right: Solid 1px #d5d5d5;" align="center"  valign="top">
      
     {if 
    $product_info.picture}
     {if 
    $product_info.big_picture}
     {if !
    $printable_version}<a href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="products_pictures/{$product_info.picture}alt="{$product_info.name}"></a>
     {if !
    $printable_version}<br>
     <
    table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
     <
    class="olive" href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
     </
    td></tr></table>
     {/if}
     {else}
     <
    img src="products_pictures/{$product_info.picture}border=0 alt="{$product_info.name}">
     {/if}
     {else}
     {if 
    $product_info.thumbnail}
     {if 
    $product_info.big_picture}
     {if !
    $printable_version}<a href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="products_pictures/{$product_info.thumbnail}alt="{$product_info.name}"></a>{if !$printable_version}<br>
     <
    table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
     <
    class="olive" href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
     </
    td></tr></table>
     {/if}
     {else}
       <
    img border=0 src="products_pictures/{$product_info.thumbnail}alt="{$product_info.name}">
     {/if}
     {/if}
     {/if}

     {if 
    $all_product_pictures}

     <
    p>{$smarty.const.ADMIN_PHOTOS}:<br><table cellpadding="3" class="voting">
     {
    section name=i loop=$all_product_pictures}
     {if 
    $smarty.section.i.index == 0}<tr>{/if}
     <
    td><a href="index.php?productID={$product_info.productID}&picture_id={$all_product_pictures_id[i]}"><img src="products_pictures/{$all_product_pictures[i]}border=0></a></td>
     {if (
    $smarty.section.i.index+1) % == 0}</tr>{/if}
     {/
    section}
     </
    table>

     {/if}
      
      </
    td>
      <
    td valign="top" width="380" align="center" style="border-bottom: Solid 1px #d5d5d5;">
      <
    table cellpadding="0" cellspacing="0" border="0" width="290">
      <
    tr>
      <
    td height="30" class="x4" style="padding-left:0px; padding-top:15; padding-bottom:10;" align="center"> {$product_info.name}</td>
      </
    tr>
      <
    tr>
      <
    td class="x6" style="padding-top:5px;padding-bottom:5px;">
      
      
     <
    table border="0" class="x6"><tr><td valign="top"
      
     {if 
    $currencies_count ne 0 && $product_info.Price 0}
     {* 
    show list price? *}
     
     <
    b>{$smarty.const.CURRENT_PRICE}:
     <
    font class="x3" id='currentPrice'>
     {if 
    $product_info.Price <= 0}
     
    n/a
     
    {else}
     {
    $product_info.PriceWithUnit}
     {/if}
     </
    font>
     </
    b>
     <
    br>
     {if 
    $product_info.list_price && 
     
    $product_info.list_price $product_info.Price && 
     
    $product_info.Price 0
     <
    b>{$smarty.const.LIST_PRICE}</b>: 
     <
    font color=brown>
     <
    strike>{$product_info.list_priceWithUnit}</strike>
     </
    font>
     {/if} 

     {* 
    you save *}
     {if 
    $product_info.list_price && 
     
    $product_info.list_price $product_info.Price && 
     
    $product_info.Price 0
     <
    br>
     <
    b>{$smarty.const.YOU_SAVE}</b>:
     <
    font color=brown>
     {
    $product_info[14]} ({$product_info[15]}%)
     </
    font>
     <
    br>
     {/if}
     {/if}
     
     
     
      {* 
    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}
     <
    font color=green>{$smarty.const.ANSWER_YES}</font>
     {/if}
     {else}
     <
    font color=#ff850d>{$smarty.const.ANSWER_NO}</font>
     
    {/if}
     </
    b>
     <
    br>
     {/if}

     
     {if 
    $product_info.shipping_freightUC}
     {
    $smarty.const.ADMIN_SHIPPING_FREIGHT}:&nbsp;
     <
    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}
     
      {if 
    $product_info.customer_votes 0} {* rating *}
     <
    p align="center">

     <
    table cellspacing="0" cellpadding="0" border="0" class="voting">
     <
    tr>
     {
    section name=i loop=5}
     <
    td align="center">
     {if 
    $smarty.section.i.index<$product_info.customers_rating}
     <
    img src="images/redstar_big.gif" class="reflect rheight51 ropacity37">
     {else}
     <
    img src="images/blackstar_big.gif" class="reflect rheight51 ropacity37">
     {/if}
     </
    td>
     {/
    section}
     </
    tr><tr>
     <
    td colspan=5 align="center">({$smarty.const.VOTES_FOR_ITEM_STRING}: {$product_info.customer_votes})</td>
     </
    tr>
     </
    table>
     {/if}
     </
    td><td>&nbsp;</td><td>


     {if !
    $printable_version}
     <
    Table class="voting"><tr><td align=center>
     <
    form name=VotingForm action='index.php' method=GET>
     <
    table width=95 border=0 cellspacing=1 cellpadding=class="voting" bgcolor=#8496AC>
     
    <tr>
     <
    td align=center><font color=#ffffff><b>{$smarty.const.VOTING_FOR_ITEM_TITLE}</b></font></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="5">{$smarty.const.MARK_GOOD}<br>
      <
    input type="radio" name="mark" value="5">{$smarty.const.MARK_AVERAGE}<br>
      <
    input type="radio" name="mark" value="5">{$smarty.const.MARK_POOR}<br>

     </
    td>
     </
    tr>
     </
    table>
     <
    input type="hidden" name="productID" value="{$product_info.productID}">
     <
    input type="hidden" name="vote" value="yes">
     <
    input type="submit" class="bbcodes" value="{$smarty.const.VOTE_BUTTON}">
     </
    form>
     </
    Table>
     {/if} 
     </
    td></tr></table
     
     <
    p align="center">
     {if 
    $product_info.eproduct_filename ne ""}
     {
    $smarty.const.PRODUCT_IS_DOWNLOADABLE} ({$product_info.eproduct_filesize})
     {/if}


     
     
      
      
      </
    td>
      </
    tr>
      <
    tr><td height="12" background="img/prod_line.gif"></td></tr>
      <
    tr><td style="padding-top:7; padding-bottom:10;" height="19" align="center"><table cellpadding="0" cellspacing="0" border="0"><tr>
      
      
      
         {* 
    add to cart *}

     {if !
    $printable_version}

       <
    form action="index.php?productID={$product_info.productID}
     
    method=post name="HiddenFieldsForm">
     
       {if 
    $smarty.const.CONF_OPEN_SHOPPING_CART_IN_NEW_WINDOW eq 0}

     {* 
    shopping cart page is shown in the same window in this cart 'add to cart' button is a form submit button *}
     
     {if 
    $product_info.Price>&& ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && 
     ( 
    $smarty.const.CONF_CHECKSTOCK==|| $product_info.in_stock ) }
     <
    input name='cart' type=image src="images/tmpl12_sale.gif" 
     
    alt="{$smarty.const.ADD_TO_CART_STRING}">
     {else}
     &
    nbsp;
     {/if}

       {else}

     {* 
    show shopping cart page in a new window => add hidden values as FORM elements and to the cart.php URL *}

     {if 
    $product_info.Price>&& ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && 
     ( 
    $smarty.const.CONF_CHECKSTOCK==|| $product_info.in_stock ) }
     <
    td height="19" width="60" align="center" bgcolor="#ffb530" class="sale"><a href="javascript:open_window('cart.php?addproduct={$product_info.productID}{counter name='select_counter_hidden' start=0 skip=1 print=false}{counter name='select_counter_hidden_extra' start=0 skip=1 print=false}{section name=i loop=$product_extra}{if $product_extra[i].option_type eq 1}{section name=s loop=$product_extra[i].option_show_times}&option_select_hidden_{counter name=select_counter_hidden}='+document.HiddenFieldsForm.option_select_hidden_{counter name=select_counter_hidden_extra}.value+'{/section}{/if}{/section}',580,400);">Купить</a></td>
     <
    td width="21" height="19"><a href="javascript:open_window('cart.php?addproduct={$product_info.productID}{counter name='select_counter_hidden' start=0 skip=1 print=false}{counter name='select_counter_hidden_extra' start=0 skip=1 print=false}{section name=i loop=$product_extra}{if $product_extra[i].option_type eq 1}{section name=s loop=$product_extra[i].option_show_times}&option_select_hidden_{counter name=select_counter_hidden}='+document.HiddenFieldsForm.option_select_hidden_{counter name=select_counter_hidden_extra}.value+'{/section}{/if}{/section}',580,400);"><img src="img/main_but_2.gif" width="21" height="19" border="0"></a></td>
      
     {else}
     &
    nbsp;
     {/if}

       {/if}

     {
    counter name='select_counter_hidden' start=0 skip=print=false}
     {
    section name=i loop=$product_extra}
     {if 
    $product_extra[i].option_type eq 1}
     {
    section name=s loop=$product_extra[i].option_show_times}
     <
    input type=hidden 
      name
    ='option_select_hidden_{counter name=select_counter_hidden}' 
      
    value='1'>
     {/
    section}
     {/if}
     {/
    section}

       </
    form>

      {/if}
      
      
      </
    tr></table></td>
      </
    tr>
      </
    table>
      </
    td>
      </
    tr>

      <
    tr>
      <
    td colspan="2">
      <
    table cellpadding="0" cellspacing="0" border="0" >
      <
    tr>
      <
    td height="15" style="padding-top:10; padding-left:0;" class="x5">Описание:</td>
      </
    tr>
      <
    tr>
      <
    td class="x6">{$product_info.description}</td>
      </
    tr>
      </
    table>
      </
    td>
      </
    tr>
      </
    table>
      </
    td>
      </
    tr>
      <
    tr><td height="8"  background="img/main_down1.gif"></td></tr>
      
     </
    table>

     
     
     
     
     

    <
    table border="0" class="x6" align="center">

     {* 
    related products *}

     {if !
    $printable_version}

       {if 
    $product_related_number 0}
    <
    tr><td>
     <
    p>
     <
    u
     {
    $smarty.const.STRING_RELATED_ITEMS}:
     </
    u
     <
    p>
     <
    table border=class="voting">
     {
    section name=i loop=$product_related}
     <
    tr>
     <
    td align="center">
     {if 
    $product_related[i].pictures.default.thumbnail}
     <
    a href="index.php?productID={$product_related[i][0]}">
     <
    img border="0" src="./products_pictures/{$product_related[i].pictures.default.thumbnail}">
     </
    a>
     {/if}
     </
    td>
     <
    td>
     <
    a href="index.php?productID={$product_related[i][0]}">
     {
    $product_related[i][1]}
     </
    a>
     </
    td>
     <
    td>
     <
    nobr>&nbsp;<font color=brown>{$product_related[i][2]}</font></nobr>
     </
    td>
     </
    tr>
     {/
    section}
     </
    table>
    </
    td></tr>
       {/if}

    </
    table>
        {/if}

       {/if}
     

    Вложения:

    • img.zip
      Размер файла:
      105,6 КБ
      Просмотров:
      40
    UROKI32, Css_Ufa и Ventil нравится это.
  3. yalama

    yalama Создатель

    Регистр.:
    25 янв 2009
    Сообщения:
    45
    Симпатии:
    2
    ну почему минус то, я вот именно на этом варианте и остановился пока.
    как говориться: "на вкус и цвет магазинчиков нет" :D

    лично для меня в вашем варианте тоже есть неудобства. в частности, то что описание слишком низко и его надо искать глазами, предварительно просмотрев всё содердимое слева направо и уж потом нижнюю строку. блок голосовалки, имхо, лишнее. так как не несёт он для покупателя никакой информации, а только из-за размеров отвлекает. если уж и довать людям возможность как-либо оценивать товар, то лучше через комментаторку. в ней хоть можно самому ключиками страницу прокачать :)
     
  4. Дмитрий Кесаев

    Дмитрий Кесаев aka Zlobniy Babko

    Заблокирован
    Регистр.:
    10 май 2007
    Сообщения:
    1.332
    Симпатии:
    1.266
    По поводу описания. Вылажено маленькое описание (поэтому не заметно), но есть шопы где описание очень большое и полное, так что, чтоб в колонке оно было - не есть гууд, нада на всю возможную ширину... А декорации прикрутить это не проблема, чтоб привлечь глаз покупателя.

    Чтоб тема не переросла в флудильню, будет лучше, если будем вылаживать сюда свои работы.
    А не писанину.
     
  5. cherepinfo

    cherepinfo Создатель

    Регистр.:
    22 май 2009
    Сообщения:
    23
    Симпатии:
    0
    Здравствуйте, а у меня сложилась такая проблема !!!
    Нужно реализовать следущее:
    Во всех разделах заходя в детальное описание человек видит описание товара, картинку с кнопкой увеличить я убрал по желанию заказщика, дальше дополнительные фотографии товара.
    В разделе фурнитура нужно оставить все как по умолчанию, т.е. картинка, описание и если надо дополнительные фото товара тоже.
    Как такое сделать ???
    Нашёл в фаиле product_detailed.php следущее:
    $smarty->assign("main_content_template", "product_detailed.tpl.html");
    Появилась идея создать дополнительный фаил например: product_detailed_2.tpl.html и прописать его в томже фаиле product_detailed.php
    Но вот как заставить работать скрипт что бы он реагировал на разные строчки немогу до конца понять.
    Буду очень признателен в любой помощи. Спасибо
    Для наглядного примера а не в целях рекламы вот ссылка на сайт ввв точка modul-glass.com.ua
     
  6. VenomHOLD

    VenomHOLD

    Регистр.:
    14 мар 2009
    Сообщения:
    272
    Симпатии:
    53
    тоесть чтобы в фурнитуре была возможность увеличить фото? или как?
     
  7. newtimes

    newtimes Магаины Opencart

    Регистр.:
    2 апр 2010
    Сообщения:
    167
    Симпатии:
    8
    Имеется ввиду что в одной категории(любой) сделать стандартный вывод страницы детального описания товара(в данном случае катнгория ФУРНИТУРА).В остаоьных категориях всё скрыть и оставить только картинки.На форуме была тема где соединяли 2 скрипта в один магазин. На одном скрипте можно оставит функции на другом убрать.Категорию фурнитуры делаешь ссылку на первый.
     
  8. highboll

    highboll Создатель

    Регистр.:
    29 мар 2010
    Сообщения:
    16
    Симпатии:
    1
    Перезалейте плиз!

    Перезалейте файлы! А то они там уже не лежат. Пожалуйста.

    Добавлено через 7 минут
    Ну или что в коде надо удалить чтобы убрать голосование и оценивание?
    И еще вопрос: пользую английский sp premium, а у меня на странице продукта в форме внизу "Do you have any questions about lorem?" кнопка отправить на русском!? как сделать английскую?
     
  9. 99cent

    99cent

    Регистр.:
    27 фев 2009
    Сообщения:
    194
    Симпатии:
    11
    Ты свой файл выложи (код), я скажу что удалить.
     
  10. highboll

    highboll Создатель

    Регистр.:
    29 мар 2010
    Сообщения:
    16
    Симпатии:
    1
    PHP:
    {* product detailed information view *}
    {if 
    $product_info ne NULL}
    <
    table width=95border=0 cellspacing=1 cellpadding=class="voting">
        <
    tr>
            <
    td width=1align=center valign=top border=0>
    {if 
    $product_info.picture}
                    {if 
    $product_info.big_picture}
                        {if !
    $printable_version}<a href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="products_pictures/{$product_info.picture}alt="{$product_info.name}"></a>
                            {if !
    $printable_version}<br>
                            <
    table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
                                <
    class="olive" href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
                            </
    td></tr></table>
                        {/if}
                    {else}
                        <
    img src="products_pictures/{$product_info.picture}border=0 alt="{$product_info.name}">
                    {/if}
                {else}
                    {if 
    $product_info.thumbnail}
                        {if 
    $product_info.big_picture}
                            {if !
    $printable_version}<a href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="products_pictures/{$product_info.thumbnail}alt="{$product_info.name}"></a>{if !$printable_version}<br>
                                <
    table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
                                <
    class="olive" href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
                            </
    td></tr></table>
                            {/if}
                        {else}
                              <
    img border=0 src="products_pictures/{$product_info.thumbnail}alt="{$product_info.name}">
                        {/if}
                    {/if}
                {/if}
                {if 
    $all_product_pictures}
                <
    p>{$smarty.const.ADMIN_PHOTOS}:<br><table cellpadding="3" class="voting">
                {
    section name=i loop=$all_product_pictures}
                    {if 
    $smarty.section.i.index == 0}<tr>{/if}
                    <
    td><a href="index.php?productID={$product_info.productID}&picture_id={$all_product_pictures_id[i]}"><img src="products_pictures/{$all_product_pictures[i]}border=0></a></td>
                    {if (
    $smarty.section.i.index+1) % == 0}</tr>{/if}
                {/
    section}
                </
    table>
                {/if}
        </
    td>
            <
    td valign=top width=99align="center" valign="top">
            <
    div align="center" class="voting"><h3>{$product_info.name}</h3></div>        
                {if 
    $product_info.description ne ""}
                <
    table border=class="bbcodes">
                    <
    tr>
                        <
    td height="100%" valign=top
                            {
    $product_info.description}
                        </
    td>
                    </
    tr>
                </
    table>
                {/if}
            <
    br>
        <
    table border="0" width="100%" class="bbcodes">
        <
    tr><td valign="top" width="50%" align="center">
                                    {if 
    $currencies_count ne 0 && $product_info.Price 0}
                                {* 
    show list price? *}
                                {if 
    $product_info.list_price && 
                                        
    $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 color="red" id='currentPrice'>
                                    {if 
    $product_info.Price <= 0}
                                        
    n/a
                                    
    {else}
                                        {
    $product_info.PriceWithUnit}
                                    {/if}
                                </
    font>
                                </
    b>
                                {* 
    you save *}
                                {if 
    $product_info.list_price && 
                                    
    $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}
                                                    {* 
    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}:&nbsp;
                                    <
    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}
                            <
    form action="index.php?productID={$product_info.productID}method=post 
                                name
    ="MainForm">
                            {* 
    extra parameters *}
                            <
    p>
                            <
    table cellpadding="4" class="bbcodes">
                                {
    counter name='select_counter' start=0 skip=print=false assign='select_counter_var'}
                                    {
    section name=i loop=$product_extra}
                                        {if 
    $product_extra[i].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[i].name}: 
                                                </
    td>
                                                <
    td>
                                                    <
    b>{$product_extra[i].option_value}</b><br>
                                                </
    td>
                                            </
    tr>
                                        {else}
                                            {
    counter name='option_show_times' start=0 skip=print=false}
                                            {
    section name=k loop=$product_extra[i].option_show_times}
                                                <
    tr bgcolor="{if $smarty.section.i.index % 2 == 0}#{$smarty.const.CONF_LIGHT_COLOR}{else}white{/if}">
                                                    <
    td>
                                                        {
    $product_extra[i].name}{if $product_extra[i].option_show_times }
                                                            ({
    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[i].values_to_select}
                                                                    {if 
    $product_extra[i].values_to_select[j].variantID eq $product_extra[i].variantID}
                                                                        <
    option value='{$product_extra[i].values_to_select[j].price_surplus}:{$product_extra[i].values_to_select[j].variantID}' selected>
                                                                    {else}
                                                                        <
    option value='{$product_extra[i].values_to_select[j].price_surplus}:{$product_extra[i].values_to_select[j].variantID}'>
                                                                    {/if}
                                                                            {
    $product_extra[i].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[i].values_to_select}
                                                                        <
    option value='{$product_extra[i].values_to_select[j].price_surplus}:{$product_extra[i].values_to_select[j].variantID}'>
                                                                            {
    $product_extra[i].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" style="text-align:center;"
                                        
    readonly
                                        id
    ="optionPrice" >
                                {/if}
                                {
    literal}
                                <
    script langauge='JavaScript'>
                                    
    document.MainForm.optionPrice.readOnly true;
                                    function 
    _formatPrice_price )
                                    {    
                                        
    _pointIndex = -1;    
                                        for( 
    i=0i_price.lengthi++ )
                                            if ( 
    _price.charAt(i) == '.' )
                                            {
                                                
    _pointIndex i;
                                                break;
                                            }
                                        if (  
    _pointIndex == -)
                                            
    _price _price ".00";
                                        else if (  
    _price.length-_pointIndex == 1  )
                                            
    _price _price "0";
                                        
    _res "";
                                        
    i=0;
                                        for( 
    i=_price.length-1>= 0i-- )
                                        {
                                            if ( 
    _price.charAt(i) == '.' )
                                                break;
                                            else
                                                
    _res _price.charAt(i) + _res;
                                        }
                                        
    _res "." _res;
                                        
    i--;
                                        
    _digitCounter 0;
                                        for( ; 
    i>=0i-- )
                                        {
                                            
    _digitCounter ++;
                                            
    _res _price.charAt(i) + _res;
                                            if ( 
    _digitCounter == && != )
                                            {
                                                
    _res "," _res;
                                                
    _digitCounter 0;
                                            }                    
                                        }
                                        return 
    _res;                                        
                                    }
                                    function 
    GetCurrentCurrency()
                                    {
                                {/
    literal}
                                        
    _selectionCount={$select_counter_var};
                                        
    _sum = {$product_info.PriceWithOutUnit};
                                        {
    counter name='select_counter2' start=1 skip=print=false 
                                            assign
    ='select_counter_var2'}
                                            {
    section name=i loop=$product_extra}
                                            {
    section name=k loop=$product_extra[i].option_show_times}
                                                
    _value =
                                                    
    document.MainForm.option_select_{$select_counter_var2}.value;
                                                
    price_surplus = ( _value.split(":") )[0];
                                                
    _sum += new Numberprice_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 == -)
                                                
    _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}
                                
    </script>
                            {/if}
                            </form>
                                                     {* add to cart *}
                        {if !$printable_version}
                          <form action="index.php?productID={$product_info.productID}" 
                                method=post name="HiddenFieldsForm">
                          {if $smarty.const.CONF_OPEN_SHOPPING_CART_IN_NEW_WINDOW eq 0}
                                {* shopping cart page is shown in the same window - in this cart 'add to cart' button is a form submit button *}
                                {if $product_info.Price>0 && ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && 
                                    ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
                                    <input name='cart' type=image src="images/tmpl12_sale.gif" 
                                        alt="{$smarty.const.ADD_TO_CART_STRING}">
                                {else}
                                    &nbsp;
                                {/if}
                          {else}
                                {* show shopping cart page in a new window => add hidden values as FORM elements and to the cart.php URL *}
                                {if $product_info.Price>0 && ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && 
                                    ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
                                    <a href="javascript:open_window('cart.php?addproduct={$product_info.productID}{counter name='select_counter_hidden' start=0 skip=1 print=false}{counter name='select_counter_hidden_extra' start=0 skip=1 print=false}{section name=i loop=$product_extra}{if $product_extra[i].option_type eq 1}{section name=s loop=$product_extra[i].option_show_times}&option_select_hidden_{counter name=select_counter_hidden}='+document.HiddenFieldsForm.option_select_hidden_{counter name=select_counter_hidden_extra}.value+'{/section}{/if}{/section}',400,300);"><img border=0 src="images/tmpl12_sale.gif" 
                                        alt="{$smarty.const.ADD_TO_CART_STRING}"></a>
                                {else}
                                    &nbsp;
                                {/if}
                          {/if}
                                {counter name='select_counter_hidden' start=0 skip=1 print=false}
                                {section name=i loop=$product_extra}
                                    {if $product_extra[i].option_type eq 1}
                                        {section name=s loop=$product_extra[i].option_show_times}
                                            <input type=hidden 
                                                name='option_select_hidden_{counter name=select_counter_hidden}' 
                                                value='1'>
                                        {/section}
                                    {/if}
                                {/section}
                          </form>
                         {/if}
            </td><td valign="top" width="50%" align="center">
                            {if $product_info.customer_votes > 0} {* rating *}
                            <p>
                            <table cellspacing="0" cellpadding="0" border="0" class="voting">
                            <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 align="center">({$smarty.const.VOTES_FOR_ITEM_STRING}: {$product_info.customer_votes})</td>
                            </tr>
                            </table>
                            {/if}
                        {if !$printable_version}
                            <Table class="voting"><tr><td align=center>
                                <form name=VotingForm action='index.php' method=GET>
                                    <table border=0 cellspacing=1 cellpadding=2 class="voting" 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" class="bbcodes" value="{$smarty.const.VOTE_BUTTON}">
                                </form>
                            </Table>
                        {/if}
            </td></tr></table>
            </td>
            </tr>
            <tr><td colspan="2" align="center">
                            {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></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 class="voting">
                    {section name=i loop=$product_related}
                        <tr>
                            <td align="center">
                            {if $product_related[i].pictures.default.thumbnail}
                                <a href="index.php?productID={$product_related[i][0]}">
                                <img border="0" src="./products_pictures/{$product_related[i].pictures.default.thumbnail}" />
                                </a>
                            {/if}
                            </td>
                            <td>
                                <a href="index.php?productID={$product_related[i][0]}">
                                    {$product_related[i][1]}
                                </a>
                            </td>
                            <td>
                                <nobr>&nbsp;<font color=brown>{$product_related[i][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:"\"":"&quot;"}"><br>
                    {$smarty.const.CUSTOMER_EMAIL}<br>
                    <input name="customer_email" type="text" size="40" value="{$customer_email|replace:"\"":"&quot;"}">
                    <p>
                    <input name="message_subject" type="hidden" size="50" value="{$product_info.name|replace:"\"":"&quot;"}">
                    <p>{$smarty.const.STRING_FEEDBACK_PRODUCT_INQUIRY_EXPLANATION} {$product_info.name}:<br>
                    <textarea name="message_text" cols="50" rows="10">{$message_text|replace:"<":"&lt;"}</textarea>
                    <p>
                    <input type="submit" class="bbcodes" value="Отправить">
                    <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 $select_counter_var != 0}
            <script>
                GetCurrentCurrency();
            </script>
    {/if}
    {/if}
    Добавлено через 2 минуты
    PHP:
    {* product detailed information view *}
    {if 
    $product_info ne NULL}
    <
    table width=95border=0 cellspacing=1 cellpadding=class="voting">
        <
    tr>
            <
    td width=1align=center valign=top border=0>
    {if 
    $product_info.picture}
                    {if 
    $product_info.big_picture}
                        {if !
    $printable_version}<a href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="products_pictures/{$product_info.picture}alt="{$product_info.name}"></a>
                            {if !
    $printable_version}<br>
                            <
    table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
                                <
    class="olive" href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
                            </
    td></tr></table>
                        {/if}
                    {else}
                        <
    img src="products_pictures/{$product_info.picture}border=0 alt="{$product_info.name}">
                    {/if}
                {else}
                    {if 
    $product_info.thumbnail}
                        {if 
    $product_info.big_picture}
                            {if !
    $printable_version}<a href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{/if}<img border=0 src="products_pictures/{$product_info.thumbnail}alt="{$product_info.name}"></a>{if !$printable_version}<br>
                                <
    table class="voting"><tr><td><img src="images/enlarge.gif"></td><td>
                                <
    class="olive" href="javascript:open_window('products_pictures/{$product_info.big_picture}',{$product_info[16]},{$product_info[17]});">{$smarty.const.ENLARGE_PICTURE}</a>
                            </
    td></tr></table>
                            {/if}
                        {else}
                              <
    img border=0 src="products_pictures/{$product_info.thumbnail}alt="{$product_info.name}">
                        {/if}
                    {/if}
                {/if}
                {if 
    $all_product_pictures}
                <
    p>{$smarty.const.ADMIN_PHOTOS}:<br><table cellpadding="3" class="voting">
                {
    section name=i loop=$all_product_pictures}
                    {if 
    $smarty.section.i.index == 0}<tr>{/if}
                    <
    td><a href="index.php?productID={$product_info.productID}&picture_id={$all_product_pictures_id[i]}"><img src="products_pictures/{$all_product_pictures[i]}border=0></a></td>
                    {if (
    $smarty.section.i.index+1) % == 0}</tr>{/if}
                {/
    section}
                </
    table>
                {/if}
        </
    td>
            <
    td valign=top width=99align="center" valign="top">
            <
    div align="center" class="voting"><h3>{$product_info.name}</h3></div>        
                {if 
    $product_info.description ne ""}
                <
    table border=class="bbcodes">
                    <
    tr>
                        <
    td height="100%" valign=top
                            {
    $product_info.description}
                        </
    td>
                    </
    tr>
                </
    table>
                {/if}
            <
    br>
        <
    table border="0" width="100%" class="bbcodes">
        <
    tr><td valign="top" width="50%" align="center">
                                    {if 
    $currencies_count ne 0 && $product_info.Price 0}
                                {* 
    show list price? *}
                                {if 
    $product_info.list_price && 
                                        
    $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 color="red" id='currentPrice'>
                                    {if 
    $product_info.Price <= 0}
                                        
    n/a
                                    
    {else}
                                        {
    $product_info.PriceWithUnit}
                                    {/if}
                                </
    font>
                                </
    b>
                                {* 
    you save *}
                                {if 
    $product_info.list_price && 
                                    
    $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}
                                                    {* 
    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}:&nbsp;
                                    <
    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}
                            <
    form action="index.php?productID={$product_info.productID}method=post 
                                name
    ="MainForm">
                            {* 
    extra parameters *}
                            <
    p>
                            <
    table cellpadding="4" class="bbcodes">
                                {
    counter name='select_counter' start=0 skip=print=false assign='select_counter_var'}
                                    {
    section name=i loop=$product_extra}
                                        {if 
    $product_extra[i].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[i].name}: 
                                                </
    td>
                                                <
    td>
                                                    <
    b>{$product_extra[i].option_value}</b><br>
                                                </
    td>
                                            </
    tr>
                                        {else}
                                            {
    counter name='option_show_times' start=0 skip=print=false}
                                            {
    section name=k loop=$product_extra[i].option_show_times}
                                                <
    tr bgcolor="{if $smarty.section.i.index % 2 == 0}#{$smarty.const.CONF_LIGHT_COLOR}{else}white{/if}">
                                                    <
    td>
                                                        {
    $product_extra[i].name}{if $product_extra[i].option_show_times }
                                                            ({
    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[i].values_to_select}
                                                                    {if 
    $product_extra[i].values_to_select[j].variantID eq $product_extra[i].variantID}
                                                                        <
    option value='{$product_extra[i].values_to_select[j].price_surplus}:{$product_extra[i].values_to_select[j].variantID}' selected>
                                                                    {else}
                                                                        <
    option value='{$product_extra[i].values_to_select[j].price_surplus}:{$product_extra[i].values_to_select[j].variantID}'>
                                                                    {/if}
                                                                            {
    $product_extra[i].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[i].values_to_select}
                                                                        <
    option value='{$product_extra[i].values_to_select[j].price_surplus}:{$product_extra[i].values_to_select[j].variantID}'>
                                                                            {
    $product_extra[i].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" style="text-align:center;"
                                        
    readonly
                                        id
    ="optionPrice" >
                                {/if}
                                {
    literal}
                                <
    script langauge='JavaScript'>
                                    
    document.MainForm.optionPrice.readOnly true;
                                    function 
    _formatPrice_price )
                                    {    
                                        
    _pointIndex = -1;    
                                        for( 
    i=0i_price.lengthi++ )
                                            if ( 
    _price.charAt(i) == '.' )
                                            {
                                                
    _pointIndex i;
                                                break;
                                            }
                                        if (  
    _pointIndex == -)
                                            
    _price _price ".00";
                                        else if (  
    _price.length-_pointIndex == 1  )
                                            
    _price _price "0";
                                        
    _res "";
                                        
    i=0;
                                        for( 
    i=_price.length-1>= 0i-- )
                                        {
                                            if ( 
    _price.charAt(i) == '.' )
                                                break;
                                            else
                                                
    _res _price.charAt(i) + _res;
                                        }
                                        
    _res "." _res;
                                        
    i--;
                                        
    _digitCounter 0;
                                        for( ; 
    i>=0i-- )
                                        {
                                            
    _digitCounter ++;
                                            
    _res _price.charAt(i) + _res;
                                            if ( 
    _digitCounter == && != )
                                            {
                                                
    _res "," _res;
                                                
    _digitCounter 0;
                                            }                    
                                        }
                                        return 
    _res;                                        
                                    }
                                    function 
    GetCurrentCurrency()
                                    {
                                {/
    literal}
                                        
    _selectionCount={$select_counter_var};
                                        
    _sum = {$product_info.PriceWithOutUnit};
                                        {
    counter name='select_counter2' start=1 skip=print=false 
                                            assign
    ='select_counter_var2'}
                                            {
    section name=i loop=$product_extra}
                                            {
    section name=k loop=$product_extra[i].option_show_times}
                                                
    _value =
                                                    
    document.MainForm.option_select_{$select_counter_var2}.value;
                                                
    price_surplus = ( _value.split(":") )[0];
                                                
    _sum += new Numberprice_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 == -)
                                                
    _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}
                                
    </script>
                            {/if}
                            </form>
                                                     {* add to cart *}
                        {if !$printable_version}
                          <form action="index.php?productID={$product_info.productID}" 
                                method=post name="HiddenFieldsForm">
                          {if $smarty.const.CONF_OPEN_SHOPPING_CART_IN_NEW_WINDOW eq 0}
                                {* shopping cart page is shown in the same window - in this cart 'add to cart' button is a form submit button *}
                                {if $product_info.Price>0 && ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && 
                                    ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
                                    <input name='cart' type=image src="images/tmpl12_sale.gif" 
                                        alt="{$smarty.const.ADD_TO_CART_STRING}">
                                {else}
                                    &nbsp;
                                {/if}
                          {else}
                                {* show shopping cart page in a new window => add hidden values as FORM elements and to the cart.php URL *}
                                {if $product_info.Price>0 && ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && 
                                    ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
                                    <a href="javascript:open_window('cart.php?addproduct={$product_info.productID}{counter name='select_counter_hidden' start=0 skip=1 print=false}{counter name='select_counter_hidden_extra' start=0 skip=1 print=false}{section name=i loop=$product_extra}{if $product_extra[i].option_type eq 1}{section name=s loop=$product_extra[i].option_show_times}&option_select_hidden_{counter name=select_counter_hidden}='+document.HiddenFieldsForm.option_select_hidden_{counter name=select_counter_hidden_extra}.value+'{/section}{/if}{/section}',400,300);"><img border=0 src="images/tmpl12_sale.gif" 
                                        alt="{$smarty.const.ADD_TO_CART_STRING}"></a>
                                {else}
                                    &nbsp;
                                {/if}
                          {/if}
                                {counter name='select_counter_hidden' start=0 skip=1 print=false}
                                {section name=i loop=$product_extra}
                                    {if $product_extra[i].option_type eq 1}
                                        {section name=s loop=$product_extra[i].option_show_times}
                                            <input type=hidden 
                                                name='option_select_hidden_{counter name=select_counter_hidden}' 
                                                value='1'>
                                        {/section}
                                    {/if}
                                {/section}
                          </form>
                         {/if}
            </td><td valign="top" width="50%" align="center">
                            {if $product_info.customer_votes > 0} {* rating *}
                            <p>
                            <table cellspacing="0" cellpadding="0" border="0" class="voting">
                            <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 align="center">({$smarty.const.VOTES_FOR_ITEM_STRING}: {$product_info.customer_votes})</td>
                            </tr>
                            </table>
                            {/if}
                        {if !$printable_version}
                            <Table class="voting"><tr><td align=center>
                                <form name=VotingForm action='index.php' method=GET>
                                    <table border=0 cellspacing=1 cellpadding=2 class="voting" 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" class="bbcodes" value="{$smarty.const.VOTE_BUTTON}">
                                </form>
                            </Table>
                        {/if}
            </td></tr></table>
            </td>
            </tr>
            <tr><td colspan="2" align="center">
                            {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></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 class="voting">
                    {section name=i loop=$product_related}
                        <tr>
                            <td align="center">
                            {if $product_related[i].pictures.default.thumbnail}
                                <a href="index.php?productID={$product_related[i][0]}">
                                <img border="0" src="./products_pictures/{$product_related[i].pictures.default.thumbnail}" />
                                </a>
                            {/if}
                            </td>
                            <td>
                                <a href="index.php?productID={$product_related[i][0]}">
                                    {$product_related[i][1]}
                                </a>
                            </td>
                            <td>
                                <nobr>&nbsp;<font color=brown>{$product_related[i][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:"\"":"&quot;"}"><br>
                    {$smarty.const.CUSTOMER_EMAIL}<br>
                    <input name="customer_email" type="text" size="40" value="{$customer_email|replace:"\"":"&quot;"}">
                    <p>
                    <input name="message_subject" type="hidden" size="50" value="{$product_info.name|replace:"\"":"&quot;"}">
                    <p>{$smarty.const.STRING_FEEDBACK_PRODUCT_INQUIRY_EXPLANATION} {$product_info.name}:<br>
                    <textarea name="message_text" cols="50" rows="10">{$message_text|replace:"<":"&lt;"}</textarea>
                    <p>
                    <input type="submit" class="bbcodes" value="Отправить">
                    <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 $select_counter_var != 0}
            <script>
                GetCurrentCurrency();
            </script>
    {/if}
    {/if}
    Оформляйте фрагменты кода в теги, не нужно создавать портянки, которые занимают 50 экранов и прокручивание которых может затянуться до утра следующего дня! (by Welho®.)