Page 1 of 1

How to display owl carousel featured product with more than one line or row of products

Posted: Wed Dec 20, 2017 5:51 pm
by mrducanhtran
I want use owl carousel to display featured product in 2 rows.
But i can not get result as below image
I attach the code and someone can help me. Thanks!

Mycode: catalog\view\theme\green\template\extension\module\featured.twig

<link href="catalog/view/javascript/jquery/owl-carousel/owl.carousel.css" type="text/css" rel="stylesheet" media="screen" />
<script src="catalog/view/javascript/jquery/owl-carousel/owl.carousel.min.js" type="text/javascript"></script>
.hide_description {
display: none;
.product-thumb .action {
display: none;
position: absolute;
top: 80px; left: 16px; right: 16px;
.product-thumb:hover .action {
display: block;
<div><h3>{{ heading_title }}</h3>
<div align="right" class="customNavigation">
<a class="btn prev_featured"><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
<a class="btn next_featured"><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
<a class="btn play_featured"><i class="fa fa-play" aria-hidden="true"></i></a>
<a class="btn stop_featured"><i class="fa fa-pause" aria-hidden="true"></i></a>
<div id="featured" class="row">
{% for product in products %}
<div class="col-xs-12 owlCarousel">
<div class="product-thumb transition">
<div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ }}" title="{{ }}" class="img-responsive" /></a></div>
<h4><a href="{{ product.href }}">{{ }}</a></h4>
<div class="hide_description">{{ product.description }}</div>
{% if product.rating %}
<div class="rating">
{% for i in 5 %}
{% if product.rating < i %}
<span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
{% else %}
<span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
{% endif %}
{% endfor %}
{% endif %}
{% if product.price %}
<div class="price">
{% if not product.special %}
{{ product.price }}
{% else %}
<span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>
{% endif %}
{% if %}
<span class="price-tax">{{ text_tax }} {{ }}</span>
{% endif %}
{% endif %}
<div class="button-group action">
<button type="button" onclick="cart.add('{{ product.product_id }}');"><i class="fa fa-shopping-cart"></i> <span class="hidden-xs hidden-sm hidden-md">{{ button_cart }}</span></button>
<button type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="fa fa-heart"></i></button>
<button type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="fa fa-exchange"></i></button>
{% endfor %}
<script type="text/javascript"><!--
$(document).ready(function() {

var owl = $("#featured");

items : 4, //4 items above 1000px browser width
autoPlay: false,
navigation: true,
navigationText: ['<i class="fa fa-chevron-left fa-5x"></i>', '<i class="fa fa-chevron-right fa-5x"></i>'],
// Responsive
responsive: true,
responsiveRefreshRate : 200,
responsiveBaseWidth: window,
pagination : false,
itemsDesktop : [1199,4],
itemsDesktopSmall : [980,4],
itemsTablet: [768,2],
itemsTabletSmall: false,
//Lazy load
lazyLoad : false,
lazyFollow : true,
lazyEffect : "fade",
itemsMobile : [479,1]

// Custom Navigation Events
owl.trigger('',1000); // event accept autoPlay speed as second parameter


Re: How to display owl carousel featured product with more than one line or row of products

Posted: Fri Dec 22, 2017 2:24 am
by cyclops12
Have you tried going into extensions/extensions then choose Modules from the dropdown.
There you can change the Limit from 4 to 8, this should give you 2 lines