<?php if(isset($result)): ?>
    <div class="row">


        <?php $__currentLoopData = $result; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $course): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <div class="col-xl-4 col-sm-6 d-flex mb-4">
                <div class="shop-item bg-white w-100">
                    <div class="text-center position-relative">
                        <div class="shop-item-rating">

                            <?php

                                $main_stars= $course->total_rating;

                                $stars=intval($main_stars);

                            ?>
                            <?php for($i = 0; $i <  $stars; $i++): ?>
                                <i class="fas fa-star text-primary"></i>
                            <?php endfor; ?>
                            <?php if($main_stars>$stars): ?>
                                <i class="fas fa-star-half text-primary"></i>
                            <?php endif; ?>
                            <?php if($main_stars==0): ?>
                                <?php for($i = 0; $i <  5; $i++): ?>
                                    <i class="far fa-star text-primary"></i>
                                <?php endfor; ?>
                            <?php endif; ?>
                        </div>
                        <a href="<?php echo e(courseDetailsUrl(@$course->id, @$course->type, @$course->slug)); ?>"
                           class="shop-item-img d-block">
                            <img class="img-fluid" src="<?php echo e(getCourseImage($course->product?->thumbnail)); ?>"
                                 alt="">
                        </a>
                    </div>
                    <div class="shop-item-content">
                        <span><?php echo e(@$course->product_category->title); ?></span>
                        <h4><a href="<?php echo e(courseDetailsUrl(@$course->id, @$course->type, @$course->slug)); ?>"
                               class="currentColor"><?php echo e($course->title); ?></a>
                        </h4>
                        <div class="d-flex align-items-end justify-content-between">
                            <div>
                                <del class="d-block fw-500">
                                    <?php if($course->product?->discount > 0): ?>
                                        <?php echo e(getPriceFormat(@$course->product->price)); ?>

                                    <?php endif; ?>
                                </del>
                                <strong class="fw-bold d-block">
                                    <?php
                                        if (@$course->product->discount_type == 1) {
                                            $price = $course->product->price - $course->product?->discount;
                                        } elseif (@$course->product->discount_type == 2) {
                                            $price = $course->product->price - ($course->product->price * $course->product?->discount) / 100;
                                        } else {
                                            $price = $course->product?->price;
                                        }
                                    ?>
                                    <?php echo e(getPriceFormat($price)); ?>

                                </strong>
                            </div>
                            <div>
                                <a href="<?php echo e(route('buyNow',[@$course->id])); ?>"
                                   class="theme-btn buyNow"><i
                                        class="fa fa-shopping-cart"></i><?php echo e(__('common.Buy Now')); ?></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

    </div>

    <input type="hidden" value="<?php echo e(asset('/')); ?>" id="baseUrl">

    <script>
        $(document).ready(function () {
            // select js
            $(".search-hide").select2({
                minimumResultsForSearch: Infinity,
            });
        });

        if ($.isFunction($.fn.lazy)) {
            $('.lazy').lazy();
        }
    </script>
<?php endif; ?>
<?php /**PATH /home/minialms/app.minialms.com/resources/views/frontend/infixlmstheme/snippets/components/_single_section_store.blade.php ENDPATH**/ ?>