@php
$article = \App\Article::with('category')->with('subcategory')->with('maincategory')->select(['id','image','main_category_id','category_id','sub_category_id','price'])->where('code',$productRows[$row]['article'])
->first();
if(empty($article))
{
// dd($article,$productRows[$row]['article']);
}
$rcolor = str_replace([' ', '-'], "_", $productRows[$row]['color']);
if(!empty($article->id))
{
$aimg = \App\ArticleImg::where('product_id',trim($article->id))->where('color_name','LIKE', '%' .$rcolor. '%')->whereIn('sort_order',[0,1])->first();
// dd($aimg);
$images = empty($aimg->imgname) || $aimg->imgname == 'NULL' ? 'https://via.placeholder.com/100x100.png?text=No Photo' : asset('/uploads/articles/photos/full'.$aimg->imgname);
}
if(empty($images))
{
$images = 'https://via.placeholder.com/100x100.png?text=No Photo';
}
@endphp
{{ $key + 1 }} |
{{ $productRows[$row]['store'] }} |
{{ !empty($article->maincategory) ? $article->maincategory->name : $productRows[$row]['section'] }} |
{{ !empty($article->category) ? $article->category->name : $productRows[$row]['subsection'] }} |
|
{{ $productRows[$row]['article'] }} |
{{ $productRows[$row]['color'] }} |
@foreach($sizes as $size)
{{ empty($articleProductCombinations[$row][$size]) ? 0 : $articleProductCombinations[$row][$size] }}
@php
if(empty($productCountSize[$size])) {
$productCountSize[$size] = 0;
}
if(empty($articleProductCombinations[$row][$size])) {
$articleProductCombinations[$row][$size] = 0;
}
$totalrow += (int)$articleProductCombinations[$row][$size] ;
$productCountSize[$size]+= (int)$articleProductCombinations[$row][$size];
@endphp
|
@endforeach
{{$totalrow}} |
@endforeach