discounted configurables

This commit is contained in:
merdan 2022-04-21 17:42:42 +05:00
parent 3537135c36
commit 3055cc10a4
2 changed files with 4 additions and 1 deletions

View File

@ -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
{

View File

@ -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);