discounted configurables
This commit is contained in:
parent
3537135c36
commit
3055cc10a4
|
|
@ -72,7 +72,7 @@ class Brand extends Model implements BrandContract
|
|||
}
|
||||
|
||||
/**
|
||||
* The products that belong to the category.
|
||||
* The products that belong to the brand.
|
||||
*/
|
||||
public function products(): HasMany
|
||||
{
|
||||
|
|
|
|||
|
|
@ -569,6 +569,9 @@ class ProductRepository extends WProductRepository
|
|||
'code' => $code]);
|
||||
|
||||
$product['brand_id'] = $brand->id;
|
||||
if(!empty($data['categories'])) {
|
||||
$brand->categories()->attach($data['categories']);
|
||||
}
|
||||
}
|
||||
//create product
|
||||
$parentProduct = $this->getModel()->create($product);
|
||||
|
|
|
|||
Loading…
Reference in New Issue