feat: implement VMware vCenter integration, enhance product pricing display, and update order processing logic.
This commit is contained in:
@@ -119,12 +119,11 @@ class Product extends Model
|
||||
|
||||
/**
|
||||
* Relationship: Product has many addons (through product type)
|
||||
* Addons are linked via type_id in product_addon table
|
||||
* Addons are linked via type in product_addon table
|
||||
*/
|
||||
public function addons()
|
||||
{
|
||||
// Assuming product_addon has type_id field that links to product type
|
||||
return $this->hasMany(Addon::class, 'type_id', 'product_type')
|
||||
return $this->hasMany(Addon::class, 'type', 'product_type')
|
||||
->orderBy('sort_order');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user