This article will guide you through setting up a product slider at the bottom of your product landing pages.
First, we need to create the product slider.
<style>.page-layout-1column .block.widget #product-slider .products-grid .product-item {width: auto;padding-left: 10px;padding-right: 10px;}[class*='.page-layout-2columns'].block.widget #product-slider .products-grid .product-item {width: auto;padding-left: 10px;padding-right: 10px;}</style><div id="latest-slider"><h2>Latest Products</h2>{{block class="Smartwave\Filterproducts\Block\Home\LatestList" name="latest_product" product_count="5" aspect_ratio="0" image_width="250" image_height="250" template="Smartwave_Filterproducts::owl_list.phtml"}}</div><script>require(['jquery','owl.carousel/owl.carousel.min'], function ($) {$("#latest-slider .owl-carousel").owlCarousel({autoplay: true,autoplayTimeout: 5000,autoplayHoverPause: true,dots: false,nav: true,navRewind: true,animateIn: 'fadeIn',animateOut: 'fadeOut',loop: true,lazyLoad: true,navText: ["<em class='porto-icon-left-open-big'></em>","<em class='porto-icon-right-open-big'></em>"],responsive: {0: {items: 1},768: {items: 2},992: {items: 2},1200: {items: 4}}});});</script>
<style>.page-layout-1column .block.widget #product-slider .products-grid .product-item {width: auto;padding-left: 10px;padding-right: 10px;}[class*='.page-layout-2columns'].block.widget #product-slider .products-grid .product-item {width: auto;padding-left: 10px;padding-right: 10px;}</style><div id="featured-slider"><h2>Featured Products</h2>{{block class="Smartwave\Filterproducts\Block\Home\FeaturedList" name="featured_product" product_count="5" aspect_ratio="0" image_width="250" image_height="250" template="Smartwave_Filterproducts::owl_list.phtml"}}</div><script>require(['jquery','owl.carousel/owl.carousel.min'], function ($) {$("#featured-slider .owl-carousel").owlCarousel({autoplay: true,autoplayTimeout: 5000,autoplayHoverPause: true,dots: false,nav: true,navRewind: true,animateIn: 'fadeIn',animateOut: 'fadeOut',loop: true,lazyLoad: true,navText: ["<em class='porto-icon-left-open-big'></em>","<em class='porto-icon-right-open-big'></em>"],responsive: {0: {items: 1},768: {items: 2},992: {items: 2},1200: {items: 4}}});});</script>
.page-layout-1column .block.widget #product-slider .products-grid .product-item {width: auto;padding-left: 10px;padding-right: 10px;}[class*='.page-layout-2columns'].block.widget #product-slider .products-grid .product-item {width: auto;padding-left: 10px;padding-right: 10px;}</style><div id="bestsellers-slider"><h2>Bestselling Products</h2>{{block class="Smartwave\Filterproducts\Block\Home\BestsellersList" name="bestsellers_product" product_count="5" aspect_ratio="0" image_width="250" image_height="250" template="Smartwave_Filterproducts::owl_list.phtml"}}</div><script>require(['jquery','owl.carousel/owl.carousel.min'], function ($) {$("#bestsellers-slider .owl-carousel").owlCarousel({autoplay: true,autoplayTimeout: 5000,autoplayHoverPause: true,dots: false,nav: true,navRewind: true,animateIn: 'fadeIn',animateOut: 'fadeOut',loop: true,lazyLoad: true,navText: ["<em class='porto-icon-left-open-big'></em>","<em class='porto-icon-right-open-big'></em>"],responsive: {0: {items: 1},768: {items: 2},992: {items: 2},1200: {items: 4}}});});</script>
<style>.page-layout-1column .block.widget #product-slider .products-grid .product-item {width: auto;padding-left: 10px;padding-right: 10px;}[class*='.page-layout-2columns'].block.widget #product-slider .products-grid .product-item {width: auto;padding-left: 10px;padding-right: 10px;}</style><div id="sale-slider"><h2>On Sale</h2>{{block class="Smartwave\Filterproducts\Block\Home\SaleList" name="sale_product" product_count="5" aspect_ratio="0" image_width="250" image_height="250" template="Smartwave_Filterproducts::owl_list.phtml"}}</div><script>require(['jquery','owl.carousel/owl.carousel.min'], function ($) {$("#sale-slider .owl-carousel").owlCarousel({autoplay: true,autoplayTimeout: 5000,autoplayHoverPause: true,dots: false,nav: true,navRewind: true,animateIn: 'fadeIn',animateOut: 'fadeOut',loop: true,lazyLoad: true,navText: ["<em class='porto-icon-left-open-big'></em>","<em class='porto-icon-right-open-big'></em>"],responsive: {0: {items: 1},768: {items: 2},992: {items: 2},1200: {items: 4}}});});</script>
If you need to filter by category, you can add the category_id option to the block as shown below:
Next, we will be adding the slider to the bottom of the product page.