store 5
This commit is contained in:
@@ -18,6 +18,7 @@ use App\Services\ConfigService;
|
||||
use App\Services\ProductDisplayPriceService;
|
||||
use App\Services\ProductPriceService;
|
||||
use App\Services\ProductPriceSyncService;
|
||||
use App\Services\CategoryService;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
|
||||
@@ -161,6 +162,9 @@ class ProductController extends SuperController
|
||||
}
|
||||
|
||||
$products = Product::with(['file'])->where('active', 1)->get();
|
||||
$categoryService = app(CategoryService::class);
|
||||
$products = $categoryService->filterProductsByVisibleCategories($products);
|
||||
$products = $categoryService->sortProductsForStore($products);
|
||||
|
||||
if (str_contains(request()->path(), '/customer/')) {
|
||||
$products->each(function (Product $product) {
|
||||
|
||||
Reference in New Issue
Block a user