Дипломник - Репутация: 8
- Webmoney BL:
? | СКРИН Нужно удалить два омеченных блока. Высылаю код из main.tpl
Код HTML: {* Главная страница магазина *}
{* Для того чтобы обернуть центральный блок в шаблон, отличный от index.tpl *}
{* Укажите нужный шаблон строкой ниже. Это работает и для других модулей *}
{$wrapper = 'index.tpl' scope=parent}
{* Канонический адрес страницы *}
{$canonical="" scope=parent}
{capture name=ltr}<!-- ltr sidebar -->{/capture}
<!-- sidebar -->
{capture name=sidebar}
<div class="sidebar">
{* Выбираем в переменную $last_posts последние записи *}
{get_posts var=last_posts limit=5}
{if $last_posts}
<div class="title"> <h4>Новые записи в блоге</h4> <div class="toggle"><i class="fa fa-angle-down"></i></div> </div> <ul class="sidebar-block sidebar-blog">
{foreach $last_posts as $post}
<li data-post="{$post->id}"> <a href="blog/{$post->url}">{$post->name|escape}</a> <p class="date">{$post->date|date}</p>
{$post->annotation}
</li>
{/foreach}
<li><a href="blog" class="to-blog">Все записи</a></li> </ul>
{/if}
{get_browsed_products var=browsed_products limit=10}
{if $browsed_products}
<div class="title"> <h4>Вы просматривали</h4> <div class="toggle"><i class="fa fa-angle-down"></i></div> </div> <ul class="sidebar-block sidebar-browsed-products">
{foreach $browsed_products as $browsed_product}
<li> <div class="image"> <a href="products/{$browsed_product->url}"> <img src="{$browsed_product->image->filename|resize:50:50}" alt="{$browsed_product->name|escape}" title="{$browsed_product->name|escape}"> </a> </div> <div class="info"> <a href="products/{$browsed_product->url}" class="name">{$browsed_product->name}</a> <div class="rating-stars">
{strip}
{section name=rate start=0 loop=5 step=1}
{if $browsed_product->votes > 0}
{if $smarty.section.rate.index < $browsed_product->rating / $browsed_product->votes && $browsed_product->votes > 0}
{if ($smarty.section.rate.index + 1) > $browsed_product->rating / $browsed_product->votes}
<i class="fa fa-star-half-o"></i>
{else}
<i class="fa fa-star"></i>
{/if}
{else}
<i class="fa fa-star-o"></i>
{/if}
{else}
<i class="fa fa-star-o"></i>
{/if}
{/section}
{/strip}
</div> <p class="price">{$browsed_product->variant->price|convert} {$currency->sign|escape}</p> </div> </li>
{/foreach}
</ul>
{/if}
{* Выбираем в переменную $all_brands все бренды *}
{get_brands var=all_brands}
{if $all_brands}
<div class="title"> <h4>Все бренды</h4> <div class="toggle"><i class="fa fa-angle-down"></i></div> </div> <ul class="sidebar-block sidebar-brands">
{foreach $all_brands as $b}
<li><a href="brands/{$b->url}">{$b->name}</a></li>
{/foreach}
</ul>
{/if}
</div>
{include file = 'widget_vk.tpl'}
{/capture}
<!-- Slider -->
{include file = 'slider.tpl'}
<div class="margin-bottom-30">
{* Заголовок страницы *}
<h1>{$page->header}</h1>
{* Тело страницы *}
{$page->body}
</div> <div class="row mp-features"> <div class="col-md-3"> <div class="mp-feature"> <div class="icon"><i class="fa fa-credit-card"></i></div> <h6>Наличный и безналичный расчет</h6> </div> </div> <div class="col-md-3"> <div class="mp-feature"> <div class="icon"><i class="fa fa-truck"></i></div> <h6>Доставка <br>по всей России</h6> </div> </div> <div class="col-md-3"> <div class="mp-feature"> <div class="icon"><i class="fa fa-refresh"></i></div> <h6>Возврат товара в течение 30 дней</h6> </div> </div> <div class="col-md-3"> <div class="mp-feature"> <div class="icon"><i class="fa fa-thumbs-o-up"></i></div> <h6>Гарантия свежести продукта</h6> </div> </div> </div>
{* Рекомендуемые товары *}
{get_featured_products var=featured_products}
{if $featured_products}
<h2>Рекомендуемые товары</h2> <div class="owl-carousel-wrapper"> <div class="owl-carousel">
{foreach $featured_products as $product_item}
<div class="item-padding">
{include file = 'product_item.tpl'}
</div>
{/foreach}
</div> </div>
{/if}
<div class="row"> <div class="col-md-6"> <a href="#" class="mp-banner"> </a> </div> <div class="col-md-6"> <a href="#" class="mp-banner"> </a> </div> </div>
{* Новинки *}
{get_new_products var=new_products limit=6}
{if $new_products}
<h2>Новинки</h2> <div class="products-grid"> <div class="row">
{foreach $new_products as $product_item}
<div class="col-sm-4">
{include file = 'product_item.tpl'}
</div>
{if ($product_item@iteration is div by 3) && !$product_item@last}
</div> <div class="row">
{/if}
{/foreach}
</div> </div>
{/if}
{* Акционные товары *}
{get_discounted_products var=discounted_products limit=3}
{if $discounted_products}
<h2>Акционные товары</h2> <div class="products-grid"> <div class="row">
{foreach $discounted_products as $product_item}
<div class="col-sm-4">
{include file = 'product_item.tpl'}
</div>
{if ($product_item@iteration is div by 3) && !$product_item@last}
</div> <div class="row">
{/if}
{/foreach}
</div> </div>
{/if}
<div class="parallax-banner fullwidth-element" data-background="#000" data-opacity="0.1" data-height="200"> <img src="design/{$settings->theme}/images/banners/banner-parallax.jpg" alt="" /> <div class="parallax-overlay"></div> <div class="parallax-title">iPhone 6<span>Единственная новость — всё по-новому.</span></div> </div> Последний раз редактировалось jemka; 30.10.2017 в 14:43. |