Jump to content

Как реализовать что бы не отображалось количество товара на сайте


Recommended Posts

Добрый день! 
Иметься сайт http://yarnstore.by/ , при выборе продукта отображается количество http://yarnstore.by/products/sekerm- 50 в карточке товара стоит бесконечность как сделать что бы не отображалось количество ?
 

Link to post
Share on other sites
product.tpl 

 

 

{* Страница товара *}

{$name_title = "{$product->name|escape} - <span>Комментарии и отзывы</span>"}

{$thisId = $product->id}

{$thisBrand = $product->brand_id}

 

{* Канонический адрес страницы *}

{$canonical="/products/{$product->url}" scope=parent}

 

<ol class="breadcrumb patchLine">

    <li><a href="./">Главная</a></li>

    {foreach from=$category->path item=cat}<li><a href="catalog/{$cat->url}">{$cat->name|escape}</a></li>{/foreach}

    {if $brand}<li><a href="catalog/{$cat->url}/{$brand->url}">{$brand->name|escape}</a></li>{/if}

</ol>

<div class="heading"><h1 data-product="{$product->id}">{$product->name|escape}{if $product->variant->sku} /Код {$product->variant->sku}{/if}</h1></div>

 

<div class="itemPage product">

 

    <div class="col-sm-9 col-md-8">

        <div class="image">

        <a href="{$product->image->filename|resize:800:600:w}" class="zoom" rel="group" title='{$product->name|escape}'>{if $product->image}<img src="{$product->image->filename|resize:200:200}" alt="{$product->name|escape}"/>{else}<i class="i-camera-alt"></i>{/if}</a>

        </div>

 

        

    </div>

 <div class="col-sm-15 col-md-16">

  {if $product->images|count>1}

        <ul class='list-inline browsedProducts text-center'>

        {foreach $product->images|cut as $i=>$image}

        <li class=" images"><a href="{$image->filename|resize:800:600:w}" title="{$browsed_product->name}" class="zoom" rel="group"><img src="{$image->filename|resize:50:50}" alt="{$product->name|escape}" /></a></li>

        {/foreach}

        </ul>

        {/if}

 </div>

             {if $product->features}

            <div class="col-sm-15 col-md-16">

                    {foreach $product->features as $f}

                        <div class="col-md-7 featuresList">

                        <p>{$f->name}:</p>

                        {if $f->in_filter}

                            <a title="Найти другие предложения с этой характеристикой в разделе '{$category->name}'" href="/catalog/{$category->url}?{$f->feature_id}={$f->value}"><b>{$f->value}</b></a><i class="i-search-1"></i>

                        {else}{$f->value}{/if}

                        </div>

                    {/foreach}

            </div>

            {/if} 

 

    

    <div class="clearfix"></div>

 

    <div class="tabsBlock">

        <ul class="nav nav-tabs">

         <li class="active"><a href="#colors" data-toggle="tab"><i class="i-tag"></i>Наличие</a></li>

        <li><a href="#home" data-toggle="tab"><i class="i-info"></i>Описание</a></li>

        <li><a href="#messages" data-toggle="tab"><i class="i-popup"></i>Дополнительно</a></li>

        </ul>

 

        <div class="tab-content">

             <div class="tab-pane fade in active" id="colors">

             

 <div class="col-sm-15 col-md-16">

 

 

 

        {if $product->variants|count > 0}

            <form class="b1c-good variants" action="/cart">

 

            <p class='b1c-name' style="display:none;">{$product->name|escape}</p>

            {if $product->variant->price > 0}

                <div class="price">

                    {if $product->variant->compare_price > 0}

                    {$econom2 = 100 - ({$product->variant->price}*100 / {$product->variant->compare_price})}

                    <ul class='list-inline oldPrice' data-toggle="tooltip" title='Старая цена'>

                        <li><strike>{$product->variant->compare_price|convert}</strike></li>

                        <li><small>Скидка {$econom2|convert}%</small></li>

                    </ul>

                    {/if}

 

                <input class='amount' type="text" name="amount" value="" maxlength="2"> <small>x</small>

                    <span>{$product->variant->price|convert}</span> <small>{$currency->sign|escape}</small>

                </div>

                         

                <select name="variant" {if $product->variants|count==1  && !$product->variant->name}style='display:none;'{/if}>

                {foreach $product->variants as $v}

                {if $v->price > 0}<option value="{$v->id}" {if $v->compare_price > 0}compare_price="{$v->compare_price|convert}"{/if} price="{$v->price|convert}">{$v->name}</option>{/if}

                {/foreach}

                </select>

 

                <input type="submit" class="btn gradient-base" value="В корзину" data-result-text="Добавить еще"/>

                <a href="" class="b1c btn gradient-base">Купить в один клик </a>

            {else}

                <p<b>Уточните цену у менеджера</b></p>

                <a href="" class="btn btn-default callme_viewform">Заказать</a>

            {/if}

 

            <div class="clearfix"></div>

            </form>

 

        {else}

            <p><b>Нет в наличии</b></p>

            <a href="" class="b1c btn gradient-base">Заказать</a>

        {/if} 

     </div>

     

                 <div class="alert alert-success alert-dismissable" style='margin:10px 0 10px'>

              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>

              <p><strong>Внимание!</strong></p>Укажите количество товара и выберите нужный вариант перед добавлением в корзину.<br />

                         Количество товара на складе указано под изображениями вариантов.<br />

                     

            </div>

     

            <div class="clearfix"></div> 

      <div class="clearfix"></div>

            {foreach $product->variants as $v}

        

                       {if $v->name}<label class="variant_name2" for="product_{$v->id}"><img  src="files/downloads/{$v->attachment}" />

                        

                        <div>

                         {$v->name}</div>

                     <div>в наличии <span class="badge">{$v->stock}</span> шт.

                        </div>

                        

                        <div>{if $v->compare_price > 0}<span class="compare_price">{$v->compare_price|convert}</span>{/if}

            <span class="price">{$v->price|convert} <span class="currency"><small>{$currency->sign|escape} </small></span></span>

                        <!--  <input type="submit" class="but_add to_cart" value="" title='Купить {$product->name|escape}' data-result-text=""/></span></span> -->

                    

                        </div>

                        </label>

                {/if}

                        {/foreach}

            </div>

            <div class="tab-pane fade in" id="home">

            {if $product->body}{$product->body}{else}<p>Нет описания</p>{/if}

            </div>

 

            <div class="tab-pane fade in" id="messages">

                         

                         Дополниительная информация для покупателей.

                         

                       </div>

        </div>

    </div>

    <div class="clearfix"></div>

</div>

 

<ul class="pager">

{if $prev_product}<li class='pull-left'><a href="products/{$prev_product->url}"><i class="i-left-bold"></i> {$prev_product->name|escape}</a></li>{/if}

{if $next_product}<li class='pull-right'><a href="products/{$next_product->url}">{$next_product->name|escape} <i class="i-right-bold"></i></a></li>{/if}

</ul>

 

{if $related_products}

    <br /><hr>

    <h2>Вместе <span>с этим товаром покупают</span></h2>

    <ul class="row list-inline itemsList">

    {foreach $related_products as $product}

    <li class="col-lg-6 col-md-8 col-sm-8 col-xs-12"><div class="product">{include file='x_included_products_block.tpl'}</div></li>

    {/foreach}

    </ul>

{/if}

{include file='x_included_comments.tpl'}

 

{* Увеличитель картинок *}

{literal}

<script type="text/javascript" src="js/fancybox/jquery.fancybox.pack.js"></script>

<link rel="stylesheet" href="js/fancybox/jquery.fancybox.css" type="text/css" media="screen" />

 

<script>

$(function() {

    // Раскраска строк характеристик

    $(".features li:even").addClass('even');

 

    // Зум картинок

    $("a.zoom").fancybox({

        prevEffect    : 'fade',

        nextEffect    : 'fade'});

    });

</script>

{/literal}

Link to post
Share on other sites

products.tpl 

 

{* Список товаров *}

 
{* Канонический адрес страницы *}
{if $category && $brand}
{$canonical="/catalog/{$category->url}/{$brand->url}" scope=parent}
{elseif $category}
{$canonical="/catalog/{$category->url}" scope=parent}
{elseif $brand}
{$canonical="/brands/{$brand->url}" scope=parent}
{elseif $keyword}
{$canonical="/products?keyword={$keyword|escape}" scope=parent}
{else}
{$canonical="/products" scope=parent}
{/if}
 
<ol class="breadcrumb patchLine">
    <li><a href="./">Главная</a></li>
    {if $category}
        {foreach from=$category->path item=cat}<li><a href="catalog/{$cat->url}" data-category="{$cat->id}">{$cat->name|escape}</a></li>{/foreach}
        {if $brand}<li>{$brand->name|escape}</li>{/if}
    {elseif $brand}<li><a href="brands/{$brand->url}">{$brand->name|escape}</a></li>
    {elseif $keyword}<li>Поиск</li>{/if}
</ol>
<div class="heading"><h1>
    {if $keyword}Поиск {$keyword|escape}
    {elseif $page}{$page->name|escape}
    {else}{$category->name|escape} {$brand->name|escape} {$keyword|escape}
    {/if}
</h1></div>
 
{if $current_page_num==1}
    {if $page->body}<p>{$page->body}</p>{/if}
    {if $category->description}<p>{$category->description}</p>{/if}
{/if}
 
<!--Каталог товаров-->
{if $products}
 
    {if $category->brands}
    <div class='well well-sm list-inline brandProductsView'>
        <a href="catalog/{$category->url}" {if !$brand->id}class="active"{/if}>Все бренды</a>
        {foreach name=brands item=b from=$category->brands}
        <a {if $b->id == $brand->id}class="active"{/if} data-brand="{$b->id}" href="catalog/{$category->url}/{$b->url}">{$b->name|escape}</a>
        {/foreach}
    </div>
    {/if}
    {if $features}
    <div class='col-md-24 well well-sm list-inline featuresProductsView'>
        {foreach $features as $f}
        <div class="col-xs-12 col-sm-12 col-md-8">
            <p data-feature="{$f->id}">{$f->name}:</p>
            <select onchange="location = this.value;" {if $smarty.get.$f@key}class='active'{/if}>
            <option value="{url params=[$f->id=>null]}" {if !$smarty.get.$f@key}selected{/if}>Все варианты</option>
            {foreach $f->options as $o}<option value="{url params=[$f->id=>$o->value, page=>null]}" {if $smarty.get[$f@key] == $o->value} selected{/if}>{$o->value|escape}</option>{/foreach}
            </select>
 
        </div>
        {/foreach}
        <div class="clearfix"></div>
    </div>
    {/if}
    <div class='col-md-24 well well-sm paginationProductsView'>{include file='x_included_pagination.tpl'}</div>
    <div class="clearfix"></div>
 
    <ul class="row list-inline itemsList">
        {foreach $products as $product}
        <li class="col-lg-6 col-md-8 col-xs-12"><div class="product">{include file='x_included_products_block.tpl'}</div></li>
        {/foreach}
    </ul>
 
 
    {if $brand->description}
        <hr>
        <h3>Торговая марка: {$brand->name}</h3>
        {$brand->description}
    {/if}
 
 
 
    {if !$page}
        <hr>
        <p>Вы можете купить {$category->name} {if $brand}{$brand->name|escape}{/if} недорого и по выгодной цене в '{$settings->site_name|escape}'. В магазине представлены {$category->name} {if $brand}{$brand->name|escape}{/if} с описаниями, а также подробные технические характеристики, фотографии и отзывы посетителей. Мы предлагаем {$category->name} {if $brand}{$brand->name|escape}{/if} ведущих мировых производителей с гарантией и доставкой.</p>
    {/if}
 
    {*if $keyword}{elseif !$brand && !$page}
        {get_discounted_products var=discounted_products category_id=$category->id limit=5 order='RAND()'}
        {if $discounted_products}
        <br /><div class="clear_dot"></div>
        <h3 class='page_title'>{$category->name|escape} по отличной цене <span>(Скидки)</span></h3>
        <ul id="itemsList" class="block">
        {foreach $discounted_products as $product}<li class="product">{include file='x_included_products_block.tpl'}</li>{/foreach}
        </ul>
        {/if}
    {/if*}
 
{else}
    <div class="alert alert-warning alert-dismissable" style='margin:50px 0 300px'>
      <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
      <p><strong>Внимание!</strong></p>Сейчас в данном разделе нет предложений. Возможно список находится на редактировании.<br />Попробуйте зайти позже.
    </div>
{/if}
 
 
{literal}
<script type="text/javascript">
$(document).ready(function(){
   Height = '';
   maxHeight = 0;
   $(".product").each(function(){
     if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
     Height = maxHeight;
   });
   $(".product").height(Height);
});
</script>
{/literal}
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...