 <?php if(($product->related_products()->where('is_active', 1)->count() > 0) || count($related_products_category_brand) > 0): ?> <section class="section featured-product wow fadeInUp"> <div class="custom_product_slider"> <h3 class="section-title"><?php echo app('translator')->getFromJson('Related Products:'); ?></h3> <div class="owl-carousel home-owl-carousel upsell-product custom-carousel owl-theme outer-top-xs"> <?php if(($product->related_products()->where('is_active', 1)->count() > 0)): ?> <?php $__currentLoopData = $product->related_products()->where('is_active', 1)->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="item item-carousel"> <div class="products"> <div class="product"> <?php echo $__env->make('includes.products.product-image-tag-section', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> <?php echo $__env->make('includes.products.product-info-price-section', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> <?php echo $__env->make('includes.animated-cart-wishlist-btn', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php else: ?> <?php if(count($related_products_category_brand) > 0): ?> <?php $__currentLoopData = $related_products_category_brand; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <div class="item item-carousel"> <div class="products"> <div class="product"> <?php echo $__env->make('includes.products.product-image-tag-section', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> <?php echo $__env->make('includes.products.product-info-price-section', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> <?php echo $__env->make('includes.animated-cart-wishlist-btn', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> </div> </div> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?> <?php endif; ?> </div> </div> </section> <?php endif; ?>