fix migrations 8

This commit is contained in:
2026-06-11 16:09:52 +03:30
parent d9e36dffca
commit 76563be5cd
2 changed files with 78 additions and 13 deletions
@@ -151,8 +151,13 @@ class ProductController extends SuperController
public function listProduct()
{
// قبل از برگرداندن لیست: قیمت محصولات متغیر از فید zaarbox (با کش کوتاه) sync شود
app(\App\Services\ProductPriceSyncService::class)->syncAll(false);
// لیست کاربر: فقط zaarbox با کش — فید legacy در کران (product:sync-prices)
$syncService = app(\App\Services\ProductPriceSyncService::class);
if (str_contains(request()->path(), '/customer/')) {
$syncService->syncForProductList();
} else {
$syncService->syncAll(false);
}
$products = Product::with(['file'])->where('active', 1)->get();