Enhance product handling and seeding logic

- Added a call to sync properties JSON in UpdateProductRelations job if the method exists.
- Updated ProductFieldsForDetail to provide a default value of '-' for missing property values.
- Simplified the insertion logic in ProductPropertyValuesSeeder by replacing 'tm' with 'tk' in the value field and removed commented-out code for clarity.
This commit is contained in:
Mekan1206
2026-02-09 23:15:56 +05:00
parent 8f49fe0124
commit 9fac84a882
3 changed files with 10 additions and 17 deletions

View File

@@ -59,6 +59,11 @@ class UpdateProductRelations implements ShouldQueue
'product_custom_value' => in_array($attribute->type, ['text', 'number']) ? $this->properties[$attribute->slug] : null,
]);
});
// sync properties json
if (method_exists($this->model, 'syncPropertiesJson')) {
$this->model->syncPropertiesJson();
}
});
}
}