fixed show true when price is 0 3

This commit is contained in:
2026-06-22 19:50:45 +03:30
parent 8858cf968b
commit 2a91837c2b
2 changed files with 63 additions and 31 deletions
+2 -3
View File
@@ -289,8 +289,7 @@ class ProductDisplayPriceService
return;
}
$normalized = $zaarbox->normalizeFeedRow($row);
$providerRaw = (int) round((float) ($normalized['price'] ?? 0) + (float) ($normalized['profit'] ?? 0));
$providerRaw = $zaarbox->resolveReferenceProviderTotal($row);
$providerActive = $useLast || $providerRaw > 0;
$product->setAttribute('reference_provider_active', $providerActive);
@@ -435,7 +434,7 @@ class ProductDisplayPriceService
$row = app(ZaarboxPriceService::class)->normalizeFeedRow($row);
return (int) round((float) ($row['price'] ?? 0) + (float) ($row['profit'] ?? 0));
return app(ZaarboxPriceService::class)->resolveReferenceProviderTotal($row);
}
private function isMeltedTradeProduct(Product $product): bool