Prote1n Posted May 15, 2012 Report Share Posted May 15, 2012 Есть идея реализовать так что бы фильтр, а точнее value, значение фильтра, отображалось под заголовком товара, то-есть если в фильтре есть допустим "Процессор: 1,8 ГГц 2,4 ГГц 3,2 ГГц" что бы например товар "ноутбук HP 0000" и под заголовком было 2,4 ГГц, без ссылки, просто текст Quote Link to post Share on other sites
Prote1n Posted May 15, 2012 Author Report Share Posted May 15, 2012 Ноутбук HP 10002,4 ГГц/ Intel/ 3 Г / Quote Link to post Share on other sites
doubledeck Posted May 16, 2012 Report Share Posted May 16, 2012 Скопировать под заголовок кусок tpl, где выводит фильтр. Quote Link to post Share on other sites
Prote1n Posted May 16, 2012 Author Report Share Posted May 16, 2012 Какой именно, я не особо разбираюсь, наведите пример пожалуйста. Мне нужно чтобы выводилось значение именно соответствующее этому товару, не все. Quote Link to post Share on other sites
Prote1n Posted May 16, 2012 Author Report Share Posted May 16, 2012 Если просто копирую код value показывает последнюю строку фильтра, все значения. Quote Link to post Share on other sites
filth Posted May 16, 2012 Report Share Posted May 16, 2012 на страничке товара код примерно такой{foreach $product->features as $f}<span>{$f->value}</span>{/foreach} Quote Link to post Share on other sites
Prote1n Posted May 16, 2012 Author Report Share Posted May 16, 2012 Вставил так:div class="product_info" !-- Название товара -- h3 class="{if $product->featured}featured{/if}"><a data-product="{$product->id}" href="products/{$product->url}">{$product->name|escape}</a></h3{foreach $product->features as $f}<span>{$f->value}</span>{/foreach} <!-- Название товара (The End) -->Ничего нет. Quote Link to post Share on other sites
filth Posted May 16, 2012 Report Share Posted May 16, 2012 ну это код для вызова свойств в конкретном товаре Quote Link to post Share on other sites
filth Posted May 16, 2012 Report Share Posted May 16, 2012 попробуй с этим поиграться{if $features}{foreach $features as $f} <div class="feature_values"> {foreach $f->options as $o} <a href="{url params=[$f->id=>$o->value, page=>null]}" {if $smarty.get.$f@key == $o->value}class="selected"{/if}>{$o->value|escape}</a> {/foreach} {/foreach}{/if} Quote Link to post Share on other sites
Prote1n Posted May 17, 2012 Author Report Share Posted May 17, 2012 Лучше, но выводит просто все value в каждом товаре, а задача value конкретного товара, к которому он относится и без ссылки, просто значение. Quote Link to post Share on other sites
Prote1n Posted May 17, 2012 Author Report Share Posted May 17, 2012 В принципе можно и ссылкой, без разницы. Quote Link to post Share on other sites
filth Posted May 17, 2012 Report Share Posted May 17, 2012 ну, что бы без ссылки, убираешь <a href=\""</a>что бы к конкретному товару не знаю, смотри мануал по смарти или проси помощи напрямую у гуру Симплы (возможно небезвозмездно) Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.