

<?php if($products->count()): ?>

    <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                        <?php
                       
                    $without_extra_price = $product->without_extra_price ?? 0;
                    $extra_charge = $product->extra_charge ?? 0;
                    $price = $without_extra_price + $extra_charge;
                        $markupValue = Auth::user()->markup_value ?? 0;

                        $markupType = Auth::user()->markup_type ?? '';

                        // FINAL PRICE
                        if($markupType == 'percent'){

                            $finalPrice = $price + (($price * $markupValue) / 100);

                        }
                        elseif($markupType == 'fixed'){

                            $finalPrice = $price + $markupValue;

                        }
                        else{

                            $finalPrice = $price;

                        }

                    ?>


        <div class="col-lg-3 col-md-4 col-sm-6">
            <div class="product-card">
                <input
                type="checkbox"
                class="shareProduct"
                value="<?php echo e($product->id); ?>"
                data-name="<?php echo e($product->collection); ?>"
                data-sku="<?php echo e($product->new_triple_sku); ?>"
                data-type="<?php echo e($product->product_type); ?>"
                data-description="<?php echo e($product->description); ?>"
                data-net_weight="<?php echo e($product->net_weight); ?>"
                data-metal_kt="<?php echo e($product->metal_kt); ?>"
                data-metal_color="<?php echo e($product->metal_color); ?>"
                data-price="<?php echo e(round($finalPrice)); ?>"
                data-url="<?php echo e(route('product.detail',$product->id)); ?>">
                <img src="<?php echo e(asset($product->image ?? 'public/img/no_image.jpg')); ?>" class="product-image  product-image-<?php echo e($product->id); ?>" onerror="this.src='<?php echo e(asset('public/img/no_image.jpg')); ?>'">
                
                <div class="product-content">
                    
                    <a href="<?php echo e(route('product.detail', $product->id)); ?>" class="">
                    <div class="product-name product-name-<?php echo e($product->id); ?>">

                        <?php echo e($product->collection); ?>


                    </div>

                    <div class="product-category product-sku-<?php echo e($product->id); ?>">

                        <?php echo e($product->new_triple_sku); ?>


                    </div>

                    <div class="product-category product-type-<?php echo e($product->id); ?>">

                        <?php echo e($product->product_type); ?>


                    </div>

                    <div class="product-price product-price-<?php echo e($product->id); ?>">


                    <!-- <div class="product-price">

                        $<?php echo e(number_format($finalPrice,2)); ?>


                    </div> -->

                        $<?php echo e(number_format($finalPrice,2)); ?>


                        <!-- $<?php echo e(number_format($product->final_price ?? 0)); ?> -->
                        <!-- <?php echo e(Auth::user()->markup_value); ?> -->

                    </div>

                    </a>
                 <div class="variation-colors mb-3">

                <span class="variation-circle yellow active"
                    data-metal="Y">
                </span>

                <span class="variation-circle white"
                    data-metal="W">
                </span>

                <span class="variation-circle rose"
                    data-metal="R">
                </span>

            </div>

        <button
            class="buy-btn addToCartBtn"
            data-id="<?php echo e($product->id); ?>"
            data-metal="Y">
            Add To Cart
        </button>

                </div>

                </div>
            </div>

        </div>

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

    <div class="col-12 product-pagi">

        <?php echo e($products->onEachSide(1)->links('pagination::bootstrap-5')); ?>


    </div>

<?php else: ?>

    <div class="col-12 text-center">

        No Products Found

    </div>

<?php endif; ?><?php /**PATH /home/braintreeeasysof/public_html/popular/resources/views/frontend/product-list.blade.php ENDPATH**/ ?>