fix(price-trigger): store the selected product instead of defaulting to gold

Only a real numeric product id is saved, and an empty alert title no longer falls back to gold.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-02 18:20:13 +03:30
co-authored by Cursor
parent e0216d35a6
commit 7b81adc096
2 changed files with 27 additions and 5 deletions
+4 -1
View File
@@ -160,7 +160,10 @@ class PriceTriggerService
{
$title = trim((string) ($product?->title ?? ''));
if ($title === '') {
$title = 'طلا';
$title = trim((string) app(ConfigService::class)->getString('metal_type', ''));
}
if ($title === '') {
$title = 'محصول';
}
$shopName = (string) app(ConfigService::class)->getString('name_fa');