Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
{* product brief view (from a category or search) *}{if $product_info ne NULL}
{if $product_info.slug}{assign var=_product_url value="?ukey=product&productID=`$product_info.productID`&product_slug=`$product_info.slug`"|set_query_html}{else}{assign var=_product_url value="?ukey=product&productID=`$product_info.productID`"|set_query_html}
{/if}{if $widget}{assign var=_form_action_url value="&view=noframe&external=1"}{/if}
<form class="product_brief_block" action='{"?ukey=cart`$_form_action_url`"|set_query_html}' method="post" rel="{$product_info.productID}" {if $widget}target="_blank"{/if}>
<input name="action" value="add_product" type="hidden" />
<input name="productID" value="{$product_info.productID}" type="hidden" />
<input class="product_price" value="{$product_info.PriceWithOutUnit|escape:'html'}" type="hidden" />
{assign var=_cnt value=''} <div class="catalog_tovar"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr> {if $product_info.thumbnail || $product_info.picture}
<!-- Thumbnail --> <td valign="top" class="catalog_tovar_img"><div class="prdbrief_thumbnail">
<table cellpadding="0" cellspacing="0"><tr><td align="center" valign="middle" style="width: {$smarty.const.CONF_PRDPICT_THUMBNAIL_SIZE}px; height: {$smarty.const.CONF_PRDPICT_THUMBNAIL_SIZE}px;">
<!-- Thumbnail -->
<a {$target} href='{$_product_url}'>{if $product_info.thumbnail}
<img src="{$smarty.const.URL_PRODUCTS_PICTURES}/{$product_info.thumbnail|escape:'url'}" alt="{$product_info.name|escape:'html'}" title="{$product_info.name|escape:'html'}" />
{elseif $product_info.picture}
<img src="{$smarty.const.URL_PRODUCTS_PICTURES}/{$product_info.picture|escape:'url'}" alt="{$product_info.name|escape:'html'}" title="{$product_info.name|escape:'html'}" />
{else}
<img src="{$smarty.const.URL_PRODUCTS_PICTURES}/nophoto.jpg" alt="{$product_info.name|escape:'html'}" title="{$product_info.name|escape:'html'}" />
{/if}</a>
</td>
</tr></table>
</div></td>
{/if} <td class="catalog_tovar_opisanie">
<div class="nazvanie"><a {$target} href='{$_product_url}'>{$product_info.name|escape:'html'}</a>
{* product code (SKU) *}
{if $product_info.product_code && $smarty.const.CONF_ENABLE_PRODUCT_SKU}
<br><i>{$product_info.product_code|escape:'html'}</i> {/if} </div>
<div class="catalog_tovar_text">{$product_info.brief_description}
<p>{if $smarty.const.CONF_VOTING_FOR_PRODUCTS eq 'True'} {if $PAGE_VIEW ne 'mobile' && $product_info.customer_votes > 0} {* rating *}
<div class="sm-current-rating1"><div class="sm-current-rating1-back"> </div><div class="sm-current-rating1-front" style="width: {$product_info.customers_rating*13}px;"> </div></div>
{/if} {/if} </p>
<p>{if $PAGE_VIEW ne 'mobile' && $product_info.allow_products_comparison && $show_comparison}
{* removed ' && $categoryID == $product_info.categoryID' *}
<div class="prdbrief_comparison"> <input id="ctrl-prd-cmp-{$product_info.productID}" class="checknomarging ctrl_products_cmp" type="checkbox" value='{$product_info.productID}' />
<label for="ctrl-prd-cmp-{$product_info.productID}">{"prd_select_to_comparison"|translate}</label> </div>
{/if} </p> </div> {if $product_info.product_extra}
<div class="prdbrief_options"> <table> {counter name='select_counter' start=0 skip=1 print=false assign='select_counter_var'} {section name=i loop=$product_info.product_extra}
{if $product_info.product_extra.option_type != 0}
{section name=k loop=$product_info.product_extra.option_show_times}
<tr> <td>
{$product_info.product_extra.name|escape:'html'}{if $product_info.product_extra.option_show_times > 1} ({$smarty.section.k.index+1}:( {else}:{/if}
</td> <td>
{counter name=select_counter assign=_cnt}
<select name='option_{$_cnt}' class="product_option">
<option value='' rel="0">{"str_not_defined"|translate|escape:'html'}</option>
{section name=j loop=$product_info.product_extra.values_to_select}
<option value='{$product_info.product_extra.values_to_select[j].variantID}' rel='{$product_info.product_extra.values_to_select[j].price_surplus}'
{if $product_info.product_extra.values_to_select[j].variantID == $product_info.product_extra.variantID}selected="selected"{/if}>
{$product_info.product_extra.values_to_select[j].option_value}
</option> {/section} </select> </td>
</tr> {/section} {/if} {/section} </table> </div> {/if}
<div class="cena_bg"> {if $currencies_count ne 0 && $product_info.Price > 0}
<div class="cena"> <span class="totalPrice">{$product_info.PriceWithUnit}</span> </div> {/if} </div> {if $product_info.ordering_available && $product_info.Price>0 && ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
<div class="knopki"> <a {$target} href='{$_product_url}' class="more"></a>
<input type="image" src="{$URL_THEME_OFFSET}/images/sp.gif" title="{"str_add_to_cart_string"|translate}" {if $smarty.const.CONF_SHOPPING_CART_VIEW ne $smarty.const.SHCART_VIEW_PAGE && !$widget} rel="{if $widget}widget{/if}" {/if} /> </div>{elseif $smarty.const.CONF_SHOW_ADD2CART eq 1 && $smarty.const.CONF_CHECKSTOCK && !$product_info.in_stock && $product_info.ordering_available} <div class="prd_out_of_stock">{lbl_prd_out_of_stock}</div>{/if} </td></tr></table>
</form>
{/if}
Подскажите как реализовать в данном файле. Перепробовал втыкать везде ... толку нет.
лучше бы заставить скрипт принимать текст в админке. цена: >0 или договорная если ноль то нет на складе
<div class="cena_bg"> {if $currencies_count ne 0 && $product_info.Price > 0}
<div class="cena"> <span class="totalPrice">{$product_info.PriceWithUnit}</span> </div> {/if} </div> {if $product_info.ordering_available && $product_info.Price>0 && ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
<div class="cena_bg"> {if $currencies_count ne 0 && $product_info.Price > 0}
<div class="cena"> <span class="totalPrice">{$product_info.PriceWithUnit}</span> {else} <span class="totalPrice">Договорная цена</span></div> {/if} </div> {if $product_info.ordering_available && $product_info.Price>0 && ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
вместоHTML:<div class="cena_bg"> {if $currencies_count ne 0 && $product_info.Price > 0} <div class="cena"> <span class="totalPrice">{$product_info.PriceWithUnit}</span> </div> {/if} </div> {if $product_info.ordering_available && $product_info.Price>0 && ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
нужно
HTML:<div class="cena_bg"> {if $currencies_count ne 0 && $product_info.Price > 0} <div class="cena"> <span class="totalPrice">{$product_info.PriceWithUnit}</span> {else} <span class="totalPrice">Договорная цена</span></div> {/if} </div> {if $product_info.ordering_available && $product_info.Price>0 && ( $smarty.const.CONF_SHOW_ADD2CART eq 1 ) && ( $smarty.const.CONF_CHECKSTOCK==0 || $product_info.in_stock > 0 ) }
По крайней мере попробуй.