{strip}{foreach from=$product_refs[$product.product_id] item=o_values key=o_name}{assign var="option" value=$meta.$o_name}{if $option.type neq "html" and $product.cf[$o_name].in_list}
{if $option.type eq "color"}{if $o_values}
{$option.name}
{foreach from=$o_values item=o_kinds key=o_color}
{/foreach}
{/if}{elseif $option.type eq "select"}{if $o_values}{assign var="all_values" value=$meta[$o_name].options}{assign var="value" value=$product.meta[$o_name]}{if $o_values|count eq 1}{if $value}
{$option.name}
{$all_values.$value}
{/if}{else}
{$option.name}
{foreach from=$o_values item=o_kinds key=o_value}{if $value eq $o_value}{$all_values[$o_value]} {else}{$all_values[$o_value]} {/if}{/foreach}
{/if}{/if}{elseif $option.type eq "multiselect"}{assign var="values" value=$product.meta[$o_name]}{if $values}{assign var="all_values" value=$meta[$o_name].options}
{$option.name}
{if $option.not_mod and $option.not_mod neq "0"}{foreach from=$values item=value key=k name=foo}{$all_values.$value} {/foreach} {else}{foreach from=$values item=value key=k name=foo}{$all_values.$value}{if !$smarty.foreach.foo.last}, {/if}{/foreach}{/if}
{/if}{elseif $option.type eq "file2"}{assign var="filename" value=$product.meta[$o_name].filename}{if $filename or ($option.not_mod and $option.not_mod neq "0")}
{$option.name}
{if $option.not_mod and $option.not_mod neq "0"}{if $product.meta[$o_name]}
{$product.meta[$o_name]} удалить {else}
Загрузить {/if}
{else}
Скачать {/if}
{/if}{elseif $option.type eq "image2"}{capture assign="images"}{foreach from=$o_values item=o_kinds key=o_value}{if $o_value and $cf_images[$o_value]}
{/if}{/foreach}{/capture}{if $images or ($option.not_mod and $option.not_mod neq "0")}
{$option.name}
{if $option.not_mod and $option.not_mod neq "0"}{if $product.meta[$o_name]}
удалить {else}
Загрузить {/if}
{else}
{$images}
{/if}
{/if}{elseif $option.type eq "textarea"}{assign var="text" value=$product.meta[$o_name]}{if $text or $text eq "0" or ($option.not_mod and $option.not_mod neq "0")}
{$option.name}
{if $option.not_mod and $option.not_mod neq "0"} {else}{$text}{/if}
{/if}{elseif $option.type eq "checkbox"}{assign var="checked" value=$product.meta[$o_name]}{if $checked}
{$option.name}
{if $checked}да{else}нет{/if}
{/if}{elseif $option.type eq "text" or $option.type eq "int" or $option.type eq "float"}{if $product.meta[$o_name] or $product.meta[$o_name] eq "0" or ($option.not_mod and $option.not_mod neq "0")}
{$option.name}
{if $option.not_mod and $option.not_mod neq "0"} {else}{$product.meta[$o_name]} {$option.unit}{/if}
{/if}{elseif $option.type eq "coordinates"}{assign var="coords" value=$product.meta[$o_name]}{if $coords.x}
{$option.name}
{/if}{elseif $option.type eq "date"}{if $product.meta[$o_name] or ($option.not_mod and $option.not_mod neq "0")}
{$option.name}
{if $option.not_mod and $option.not_mod neq "0"} {else}{$product.meta[$o_name]} {$option.unit}{/if}
{/if}{elseif $option.type eq "date_interval"}{if $product.meta[$o_name] or ($option.not_mod and $option.not_mod neq "0")}
{$option.name}
{if $option.not_mod and $option.not_mod neq "0"}
от
до
{else}
от {$product.meta[$o_name].from}
до {$product.meta[$o_name].to}
{/if}
{/if}{elseif $option.type eq "color_ref" or $option.type eq "color2"}{assign var="values" value=$product.meta[$o_name]}{if $values or $values|count}
{$option.name}
{if !$option.multi or $option.multi eq "0"}{assign var="count" value=$o_values|count}{assign var="all_values" value=$option.options}{assign var="value" value=$product.meta[$o_name]}{if $count eq 1 or $option.render_type eq "color"}
{foreach from=$o_values item=o_kinds key=o_value}{assign var="val" value=$all_values.$o_value}{assign var="image" value=$cf_images[$val.image.image_id]}
{if $o_value eq $value or in_array($o_value, $value)}
{/if}
{/foreach}
{else}
{foreach from=$o_values item=o_kinds key=o_value}{assign var="val" value=$all_values.$o_value}{assign var="image" value=$cf_images[$val.image.image_id]}
{if $o_value eq $value or in_array($o_value, $value)}{capture assign="active"}
{$val.text}
{/capture}{/if}{/foreach}
{/if}{else}{assign var="values" value=$product.meta[$option.code]}{assign var="count" value=$values|count}{if !$option.not_mod or $option.not_mod eq "0"}
{foreach from=$values item=e key=k name=foo}{assign var="index" value=$smarty.foreach.foo.index}{assign var="val" value=$option.options[$e]}{assign var="image" value=$cf_images[$val.image.image_id]}
{/foreach}
{else}{if $count eq 1 or $option.render_type eq "color"}
{foreach from=$values item=e key=k name=foo}{assign var="index" value=$smarty.foreach.foo.index}{assign var="val" value=$option.options[$e]}{assign var="image" value=$cf_images[$val.image.image_id]}
{if $index eq 0}{capture assign="active"}{$option.name}: {$e}{/capture}{/if}{/foreach}
{else}
{foreach from=$values item=e key=k name=foo}{assign var="index" value=$smarty.foreach.foo.index}{assign var="val" value=$option.options[$e]}{assign var="image" value=$cf_images[$val.image.image_id]}
{if $index eq 0}{capture assign="selected"}{$option.name}: {$e}{/capture}{capture assign="active"}
{$val.text}
{/capture}{/if}{/foreach}
{if $val}
{/if}
{/if}{/if}{/if}
{/if}{/if}