Вывод брендов на главной странице в теме Быстрая покупка
Магазин - Витрины - Шаблоны
В home.html добавить код:
<div class="container">
<h2><a href="/brands/">Бренды</a></h2>
<div class="brands-home">
{foreach shopProductbrandsPlugin::getBrands() as $b}
<a href="{$b.url}" title="{$b.name|escape}">
{if $b.image}<img alt="{$b.name|escape}" src="{$wa_url}wa-data/public/shop/brands/{$b.id}/{$b.id}{$b.image}">{else}{$b.name|escape}{/if}
</a>
{/foreach}
</div>
</div>
<script>
$(function () {
$('.brands-home').slick({
infinite: true,
slidesToShow: 5,
slidesToScroll: 2,
responsive: [
{
breakpoint: 800,
settings: {
slidesToShow: 3
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 2
}
}
]
})
});
</script>
В users.css добавить код:
.brands-home {
margin-bottom: 10px;
}
.brands-home a {
height: 100px;
line-height: 100px;
display: inline-block;
text-align: center;
}
.brands-home a img {
vertical-align: middle;
display: inline-block;
max-height: 100px;
max-width: 150px;
}
Чтобы добавить комментарий, зарегистрируйтесь или войдите
0 комментариев