Viewing file: 1da8c1f1992c280143a776e3e7797b12.php (11.27 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!--==== START New product ====--> <section class="new-product "> <?php if($type != 'releted'): ?> <div class="flex-wrapper title-row title-space my-1 new-product-main-section"> <div class="cust_left"> <div class="short-intro"> <div class="heading-lg"><?php if($type == 'new'): ?> <?php echo e(__('homepage')['new_product']); ?>
<?php elseif($type == 'trending'): ?> <?php echo e(__('homepage')['trending_product']); ?>
<?php elseif($type == 'releted'): ?> <?php echo e(__('product_details')['releted_products']); ?>
<?php elseif($type == 'featured'): ?> <?php echo e(__('homepage')['featured_products']); ?>
<?php endif; ?></div> </div> </div> <?php if($type != 'featured' ): ?> <div class="cust_right"> <a href="<?php echo e(route('product.all',['type' => $type])); ?>" class="view_all"><?php echo e(__('homepage')['view_all_product']); ?> <i class="fas fa-chevron-right mx-2"></i></a> </div> <?php endif; ?> </div> <?php endif; ?>
<div id="<?php if($isSlider): ?> new-product <?php endif; ?>" <?php if(!$isSlider): ?> class="product-gird" <?php endif; ?>> <ul class="<?php if($isSlider): ?> product new-product-js slick-arrow <?php else: ?> product prod-grid-col5 <?php endif; ?> mt-3"> <?php $__currentLoopData = $productsArr; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if($key < 8): ?> <?php
$price = $value->price; $special = 0; $offTxt = ''; $date = Carbon\Carbon::parse($value->created_at); $now = Carbon\Carbon::now(); $diff = $date->diffInDays($now);
if($value->special) {
$endDate = Carbon\Carbon::createFromFormat('m/d/Y',$value->special->end_date); $startDate = Carbon\Carbon::createFromFormat('m/d/Y', $value->special->start_date); $todayDate = Carbon\Carbon::createFromFormat('m/d/Y', date('m/d/y')); if($startDate->gte($todayDate) && $todayDate->lte($endDate)) { $special = $value->special->price; $offTxt = calculatePercentage($price,$special); } }
$stars = $value->review_avg ? $value->review_avg : 0;
$starResult = ""; for ( $i = 1; $i <= 5; $i++ ) { if ( round( $stars) >= $i ) { $starResult .= " <i class='fa fa-star' style='color:#FFCC00 !important'></i>"; } elseif ( round( $stars + .25 ) >= $i ) { $starResult .= " <i class='fa fa-star-half-o' ></i>"; } else { $starResult .= " <i class='fa fa-star' style='color:#BCC7D1'></i>"; } }
?>
<li>
<div class="product-box my-2"> <div class="product-box-card-sec"> <a href="<?php echo e(route('product.details',['id' => $value->id])); ?>" class="prod-img home-product-image-sections"> <img data-original="<?php echo e(asset('uploads')); ?>/product/<?php echo e($value->image); ?>" class="lazy"> </a> <?php if($value->quantity == 0): ?> <span class="latest-badge out-stock"><?php echo e(__('common')['label_out_of_stock']); ?></span> <?php elseif($value->quantity != 0 && $offTxt == '' && $diff < 15 ): ?> <span class="latest-badge "><?php echo e(__('common')['label_new']); ?></span> <?php elseif($value->quantity != 0 && $offTxt != ''): ?> <span class="latest-badge discount-badge"><?php echo e($offTxt); ?></span> <?php elseif($value->quantity != 0 && $offTxt == '' && $diff > 15 && ((int)$value->viewed > 999 && (int)$value->viewed < 1200)): ?> <span class="latest-badge trending-badge"><?php echo e(__('common')['trending']); ?></span> <?php endif; ?>
<div class="floating-bar"> <div class="floating-add-to-cart d-flex justify-content-center"> <input type="hidden" name="productID" value="<?php echo e($value->id); ?>"> <a href="javascript:void(0);" class="quickviewtext" data-product="<?php echo e($value->id); ?>"> <i class="fa fa-eye"></i> </a> </div> <?php if(Auth::guard('customer')->check()): ?> <?php if(in_array($value->id, getWishlist())): ?> <div class="floating-wishlist fill-wishlist d-flex justify-content-center"> <a href="javascript:void(0);" class="d-flex align-items-center" onclick="addToWish(this,'<?php echo e($value->id); ?>')"> <i class="fas fa-heart"></i> </a> </div> <?php else: ?> <div class="floating-wishlist d-flex justify-content-center"> <a href="javascript:void(0);" class=" d-flex align-items-center" onclick="addToWish(this,'<?php echo e($value->id); ?>')"> <i class="fas fa-heart"></i> </a> </div> <?php endif; ?> <?php else: ?> <div class="floating-wishlist d-flex justify-content-center"> <a href="javascript:void(0);" class=" d-flex align-items-center" onclick="addToWish('<?php echo e($value->id); ?>')"> <i class="fas fa-heart"></i> </a> </div> <?php endif; ?> </div>
<!-- <a href="javascript:void(0);" class="<?php if(Auth::guard('customer')->check() && in_array($value->id, getWishlist())): ?> add-to-wishlist-fill <?php else: ?> add-to-wishlist <?php endif; ?> wishlist<?php echo e($value->id); ?> wishlist<?php echo e($value->id); ?>" data-title="Add to Wishlist" onclick="addToWish('<?php echo e($value->id); ?>')"><i class="fa fa-heart-o" aria-hidden="true"></i></a> -->
<div class="mx-2 mb-3 mt-4"> <div class="product-detail mb-3"> <p class="modeltext mt-1 mb-1"><?php echo e(isset($value->category->name)?$value->category->name:''); ?></p> <ul class="rating rating-top-selling"> <?php echo $starResult; ?>
</ul> <?php if(isset($value->productDescription->name) && $value->productDescription->name): ?> <a href="<?php echo e(route('product.details',['id' => $value->id])); ?>" class="prod-title mb-3 "> <?php echo e(Str::limit($value->productDescription->name, 48, '...')); ?></a> <?php endif; ?>
<div class="mt-2 mb-2 price-with-rating-sec home-product-price-section d-block justify-content-between align-items-center"> <?php if($special > 0): ?> <div class="price pb-2"> <span class="specialPrice"><?php echo e(config('settingConfig.config_currency')); ?><?php echo e(number_format($special,2)); ?></span> <span class="originalPrice"><?php echo e(config('settingConfig.config_currency')); ?><?php echo e(number_format( $value->price,2)); ?></span> </div> <?php else: ?> <div class="price pb-2"><?php echo e(config('settingConfig.config_currency')); ?><?php echo e($value->price); ?>
<span class="offer"><?php echo e($offTxt); ?></span></div> <?php endif; ?>
</div>
<!-- <p class="modeltext mt-1 mb-3"><?php echo e($value->model); ?></p> --> </div>
<div class="d-block"> <div class="quickview quickview-common"> <a href="" class="btn-add-to-cart align-items-center"> Add To Cart </a> </div> </div> </div> </div> </div> </li>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </ul> </div>
</section> <!--==== End New product ====--> <?php /**PATH /home/picotech/domains/ecom1.picotech.app/public_html/resources/views/frontend/partials/homeproduct.blade.php ENDPATH**/ ?>
|