better management of shipping and basket summary display
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use App\Models\Shop\Offer;
|
||||
use App\Models\Shop\PriceList;
|
||||
use App\Traits\Model\Basic;
|
||||
|
||||
class Offers
|
||||
@@ -36,7 +37,7 @@ class Offers
|
||||
return Offer::with([
|
||||
'variation',
|
||||
'article.article_nature',
|
||||
'article.product.Specie',
|
||||
'article.product',
|
||||
'article.image',
|
||||
'price_lists.price_list_values',
|
||||
])->withPriceListsBySaleChannel($saleChannelId)->byIds($ids)->get();
|
||||
@@ -67,8 +68,9 @@ class Offers
|
||||
{
|
||||
$saleChannelId = $saleChannelId ? $saleChannelId : SaleChannels::getDefaultID();
|
||||
$offer = Offer::withPriceBySaleChannelByQuantity($saleChannelId, $quantity)->find($id);
|
||||
|
||||
return $offer->price_lists->first()->price_list_values->first();
|
||||
$priceList = $offer->price_lists->first();
|
||||
|
||||
return $priceList ? $priceList->price_list_values->first() : false;
|
||||
}
|
||||
|
||||
public static function getOffersByArticles($article_ids, $saleChannelId = false)
|
||||
|
||||
Reference in New Issue
Block a user