@php /** * @name Pagina lista carrelli\Carrello\Prodotto\Prodotto con varianti\Prodotto con una variazione * @version 1.0.0 */ @endphp @foreach ($variations as $variation) @php $attribute = $variation->get_attributes(); $type = $attribute->get_type(); $term = $attribute->get_term(); @endphp @if ($variation->get_quantity() > 0)
@php $term_type = 'text'; $nocolor = false; if ($type == 'color') { $term_type = 'color'; $color = $variation->get_color(); if (!empty($color)) { $term_type = $color->get_type(); $color = $color->get_color(); } else { $nocolor = true; $color = ''; } } $class_term = ['cart-list-product-attribute', 'cart-list-product-attribute-type-' . $type, 'attr-' . $term_type, 'attr-' . $term->get_slug()]; if ($nocolor) { $class_term[] = 'attr-color-not-found'; } @endphp
@if ($term_type == 'text') {{ $term->get_name() }} @endif @if ($term_type == 'hex')
@endif @if ($term_type == 'image')
@endif
@php $term_type = 'text'; $class_term = ['cart-list-product-term', 'cart-list-product-term-' . $term->get_slug()]; $nocolor = false; if ($type == 'color') { $term_type = 'color'; $color = $term->get_color(); if (!empty($color)) { $term_type = $color->get_type(); } $class_term[] = 'cart-list-product-term-' . $term_type; } else { $class_term[] = 'cart-list-product-term-text'; } if ($nocolor) { $class_term[] = 'attr-color-not-found'; } @endphp
{!! $term->get_quantity() !!}
{!! $variation->get_quantity() !!}
x {!! $product->get_price_html() !!}
{!! $variation->get_amount_html(true) !!}
@endif @endforeach