Jump to content

Вывод цены первого варианта


Recommended Posts

Несколько дней голову ломаю, что нужно оставить, что бы выводилась только стоимость обведенная красным:

 

{foreach $new_products as $product}
<article class="product thumb">
<div class="r">
<a href="products/{$product->url}" class="nounderline" title="{$product->name|escape}">
<span class="image-container">
<span class="image">
{if $product->image}
<img src="{$product->image->filename|resize:200:145}" alt="{$product->name|escape}" title="{$product->meta_title|escape}"/>
{/if}
</span>
</span>
<span class="underline h4">{$product->name|escape}</span>
</a>
{if $product->variants|count > 0}
<form class="variants" action="/cart">
{foreach $product->variants as $v}
<dl>
<dd>
<input id="featured_{$v->id}" name="variant" value="{$v->id}" type="radio" class="variant_radiobutton" {if $v@first}checked{/if} {if $product->variants|count<2}style="display:none;"{/if}/>
{if $v->name}<label class="variant_name" for="featured_{$v->id}">{$v->name}</label>{/if}
</dd>
<dt class="price small">
{if $v->compare_price > 0}<span class="old-price">{$v->compare_price|convert} {$currency->sign|escape}</span> <span class="new-price">{$v->price|convert} {$currency->sign|escape}</span>
{else}{$v->price|convert} {$currency->sign|escape}
{/if}
</dt>
</dl>
{/foreach}
<input type="submit" class="button small" value="В корзину" data-result-text="Добавлено"/>
</form>
{else}
<input type="submit" class="disabled small" value="Нет в наличии" disabled/>
{/if}
</div>
</article>
{/foreach}
</section>
{/if}
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...