Skip to content

Commit

Permalink
Merge branch 'related-product' of https://github.com/vijay-webkul/bag…
Browse files Browse the repository at this point in the history
…isto into related-product
  • Loading branch information
vijay-webkul committed Apr 3, 2023
2 parents 4768415 + c4aa048 commit b097915
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/Webkul/Product/src/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public function booking_product()
public function related_products(): BelongsToMany
{
return $this->belongsToMany(static::class, 'product_relations', 'parent_id', 'child_id')
->limit(4);
->limit(30);
}

/**
Expand All @@ -317,7 +317,7 @@ public function related_products(): BelongsToMany
public function up_sells(): BelongsToMany
{
return $this->belongsToMany(static::class, 'product_up_sells', 'parent_id', 'child_id')
->limit(4);
->limit(30);
}

/**
Expand All @@ -328,7 +328,7 @@ public function up_sells(): BelongsToMany
public function cross_sells(): BelongsToMany
{
return $this->belongsToMany(static::class, 'product_cross_sells', 'parent_id', 'child_id')
->limit(4);
->limit(30);
}

/**
Expand All @@ -342,7 +342,7 @@ public function cross_sells(): BelongsToMany
public function isSaleable(): bool
{
return $this->getTypeInstance()
->isSaleable();
->isSaleable();
}

/**
Expand All @@ -355,7 +355,7 @@ public function isSaleable(): bool
public function isStockable(): bool
{
return $this->getTypeInstance()
->isStockable();
->isStockable();
}

/**
Expand All @@ -368,7 +368,7 @@ public function isStockable(): bool
public function totalQuantity(): int
{
return $this->getTypeInstance()
->totalQuantity();
->totalQuantity();
}

/**
Expand All @@ -382,7 +382,7 @@ public function totalQuantity(): int
public function haveSufficientQuantity(int $qty): bool
{
return $this->getTypeInstance()
->haveSufficientQuantity($qty);
->haveSufficientQuantity($qty);
}

/**
Expand Down Expand Up @@ -437,7 +437,7 @@ public function getProductAttribute()
public function getBaseImageUrlAttribute()
{
$image = $this->images()
->first();
->first();

return $image->url ?? null;
}
Expand Down

0 comments on commit b097915

Please sign in to comment.