This commit is contained in:
2026-06-11 19:23:16 +03:30
parent f329419c3a
commit b5d2b878de
10 changed files with 237 additions and 116 deletions
@@ -152,12 +152,9 @@ class ProductController extends SuperController
public function listProduct()
{
// لیست کاربر: فقط zaarbox با کش — فید legacy در کران (product:sync-prices)
$syncService = app(\App\Services\ProductPriceSyncService::class);
if (str_contains(request()->path(), '/customer/')) {
$syncService->syncForProductList();
} else {
$syncService->syncAll(false);
// ادمین: sync اختیاری از کش — کاربر: فقط enrich از کش کران (بدون HTTP / بدون UPDATE)
if (!str_contains(request()->path(), '/customer/')) {
app(\App\Services\ProductPriceSyncService::class)->syncAll(false);
}
$products = Product::with(['file'])->where('active', 1)->get();