menu Controller
This commit is contained in:
parent
a176efe6e5
commit
c9126ec5cd
|
|
@ -85,8 +85,8 @@ class Product extends JsonResource
|
|||
{
|
||||
if($this->type == 'configurable')
|
||||
{
|
||||
$variant = $this->variants()->with('product')->orderBy('min_price')->first();
|
||||
$product = $variant->product;
|
||||
$product = $this->variants()->with('product_flat')->orderBy('product_flat.min_price')->first();
|
||||
|
||||
}else{
|
||||
$product = $this->product ? $this->product : $this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue