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:
1 parent
8f49fe0124
commit
9fac84a882
3 files changed
+10
-17
No files matched your search
@@ -59,6 +59,11 @@ public function handle(): void
|
||||
'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();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user