@php use Illuminate\Support\Str; $count = core()->getConfigData('catalog.products.homepage.no_of_featured_product_homepage'); $count = $count ? $count : 20; $direction = core()->getCurrentLocale()->direction == 'rtl' ? 'rtl' : 'ltr'; $onSaleProducts = app(\Webkul\Velocity\Repositories\Product\ProductRepository::class)->getSaleProducts(10)->items(); @endphp {{-- TODO: change the product-route to shop.productOrCategory.index --}} {{-- TODO: use the Vue component --}} {{-- --}} @foreach ($onSaleProducts as $idx => $productFlat) @if($productFlat && $productFlat->product && $productFlat->getTypeInstance()) @endif @endforeach @push('scripts') @endpush