minor fixes
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use App\Models\Shop\Offer;
|
||||
use App\Models\Shop\PriceList;
|
||||
use App\Traits\Model\Basic;
|
||||
|
||||
class Offers
|
||||
@@ -30,6 +29,7 @@ class Offers
|
||||
{
|
||||
return Offer::with('variation')->byIds($ids)->get();
|
||||
}
|
||||
|
||||
public static function getWithPricesByIds($ids, $saleChannelId = false)
|
||||
{
|
||||
$saleChannelId = $saleChannelId ? $saleChannelId : SaleChannels::getDefaultID();
|
||||
@@ -69,7 +69,7 @@ class Offers
|
||||
$saleChannelId = $saleChannelId ? $saleChannelId : SaleChannels::getDefaultID();
|
||||
$offer = Offer::withPriceBySaleChannelByQuantity($saleChannelId, $quantity)->find($id);
|
||||
$priceList = $offer->price_lists->first();
|
||||
|
||||
|
||||
return $priceList ? $priceList->price_list_values->first() : false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user