{if $resultRelatedProducts|count > 0}	
<script>
$(document).ready(function(){
    if (window.matchMedia('(min-width: 992px)').matches){
            $('.related,.crossel').not('.slick-initialized').slick({
                infinite: false,
                speed: 700,
                slidesToShow: 4,
                    slidesToScroll:4,
                 prevArrow: '<span class="icon-left-thin sli-arrow left"></span>',
                  nextArrow: '<span class="icon-right-thin sli-arrow right"></span>',
         });

       
    }
    else{
          $('.wdgt-slider_{$uniqueID}').not('.slick-initialized').slick({
                    infinite: false,
                    speed: 700,
                     prevArrow: '<span class="icon-left-thin sli-arrow left"></span>',
                      nextArrow: '<span class="icon-right-thin sli-arrow right"></span>',
                      slidesToShow: 3,
                    slidesToScroll: 3,
                    responsive: [
                           {
                          breakpoint: 570,
                          settings: {
                            slidesToShow: 2,
                            slidesToScroll: 2
                          }
                        },
                        {
                          breakpoint: 360,
                          settings: {
                            slidesToShow: 1,
                            slidesToScroll: 1
                          }
                        }
                    ]
                });
        }
            	$('.recent-view').slick({
            		vertical: true,
                    infinite: false,
                    speed: 300,
                    prevArrow: '<span class="icon-arrow-bold-left sli-arrow left"></span>',
                    nextArrow: '<span class="icon-arrow-bold-right sli-arrow right"></span>',
                    slidesToShow: 3,
                    slidesToScroll: 3,
                    responsive: [
                        {
                          breakpoint: 991,
                          settings: {
                            slidesToShow: 4,
                            slidesToScroll: 4,
                            vertical: false,  
                          }
                        },{
                          breakpoint: 768,
                          settings: {
                            vertical: false,    
                            slidesToShow: 3,
                            slidesToScroll: 3,
                          }
                        },
                        {
                          breakpoint: 600,
                          settings: {
                            vertical: false,    

                            slidesToShow: 2,
                            slidesToScroll: 2,
                          }
                        },
                        {
                          breakpoint: 480,
                          settings: {
                            vertical: false,    

                            slidesToShow: 1,
                            slidesToScroll: 1,
                          }
                        },
                    ]
            	});  

});
</script>
    <div id="related-product" class="pdct-listing {if $type=='upsell'} vertical{/if}">
		{if $type=='related'}
			<h5 class="py-3 mb-5 h4 text-left">{$language.lblRelatedProductsTitle}</h5>
		{else if $type=='upsell'} 
			<h5 class="py-2 mb-5 h4 text-left">{$language.lblUpsellProducts}</h5>	
		{else if $type=='crossel'}
			<h5 class="py-3 mb-5 h4 text-left">{$language.lblCrossProducts}</h5>
		{/if}
       <div class="wdgt-slider_{$uniqueID} {$type} recent-view">
			{assign var="relatedProductCount" value=$resultRelatedProducts|count}
			{foreach $resultRelatedProducts as $RelatedProductProduct key="key"}			
			<div class="panel px-0 px-sm-2 py-1">
                <div class="seprator clearfix border bg-white p-2 mx-1">
					<div class="tumbImgbx text-center">
						{html->anchor href="{$RelatedProductProduct.productID|sef_path:'product'}" caption="<img src='{$view_public_path}/uploads/catalog/product/thumb/{$RelatedProductProduct.productImage}' class='img-fluid mx-auto my-0' />"}
					</div>
					<div class="tumbimgCaption product-info-block px-2">
					{html->anchor href="{$RelatedProductProduct.productID|sef_path:'product'}" class="" caption="{$RelatedProductProduct.productTitle|truncate:40}"}<br>
                                         {if $RelatedProductProduct.sellAsBatch eq 'Yes'} <div class="text-medium font-small pb-1">{$language.lblSetof} {$RelatedProductProduct.qtyPerBatch} {$RelatedProductProduct.batchType}</div>{/if}
					{if $RelatedProductProduct.productOptionRegularPrice neq $RelatedProductProduct.offerPrice}
					<del class="mr-2">{$RelatedProductProduct.productOptionRegularPrice|price}</del>
                        {/if} <strong class="h5 pt-1 font-bold">{$RelatedProductProduct.offerPrice|price}</strong>
				    </div>
				</div>
           </div>
			{/foreach}
		</div>	
    </div>

	{/if}
	
	
	
	