@if ($data->show && $data->promo_id && $promo = $helper->getPromoDetail(['id'=>$data->promo_id])) @php add_js_src(theme_asset('components/common/script.js')); $title = $data->title; $args = [ '@limit' => $data->limit && $data->limit > 0 ? $data->limit : 4, '@sorttype' => $data->sorttype(1), '@with' => ['promoAvailable'], // '@withCountPromoAvailable' => [ // 'promos.id' => $data->promo_id // ], // '@withReviews' => true, '@withOption' => true, '@withCategory' => true, '@promo' => $data->promo_id, '@withGallery' => true ]; if($data->match_label && $data->match_label != 'none' && $data->labels){ $args[$data->match_label == 'all' ? '@matchAllLabel' : '@hasAnyLabel'] = $data->labels; } if($data->match_tag && $data->match_tag != 'none' && $data->tags){ $args[$data->match_tag == 'all' ? '@matchAllTag' : '@hasAnyTag'] = $data->tags; } @endphp @if (count($products = $helper->getProducts($args)))