Fix on default sale channel
This commit is contained in:
@@ -10,7 +10,14 @@ class Offers
|
||||
{
|
||||
$sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID();
|
||||
return Offer::active()
|
||||
->with(['article_nature', 'variation', 'tariff.price_lists.price_list_values'])
|
||||
->with([
|
||||
'article_nature',
|
||||
'variation',
|
||||
'tariff.price_lists' => function($query) use ($sale_channel_id) {
|
||||
$query->bySaleChannel($sale_channel_id);
|
||||
},
|
||||
'tariff.price_lists.price_list_values',
|
||||
])
|
||||
->byArticles($articles_ids)
|
||||
->bySaleChannel($sale_channel_id)
|
||||
->get();
|
||||
@@ -20,7 +27,14 @@ class Offers
|
||||
{
|
||||
$sale_channel_id = $sale_channel_id ? $sale_channel_id : SaleChannels::getDefaultID();
|
||||
return Offer::active()
|
||||
->with(['article_nature', 'variation', 'tariff.price_lists.price_list_values'])
|
||||
->with([
|
||||
'article_nature',
|
||||
'variation',
|
||||
'tariff.price_lists' => function($query) use ($sale_channel_id) {
|
||||
$query->bySaleChannel($sale_channel_id);
|
||||
},
|
||||
'tariff.price_lists.price_list_values',
|
||||
])
|
||||
->byArticle($article_id)
|
||||
->bySaleChannel($sale_channel_id)
|
||||
->get();
|
||||
|
||||
Reference in New Issue
Block a user