@php
/**
* @name Pagina lista ordini\Ordine\Prodotto\Prodotto con varianti\Prodotto con due variazioni
* @version 1.0.0
*/
@endphp
@foreach ( $variations as $variation )
@php
$main_attribute = $variation->get_attributes();
$main_term = $main_attribute->get_term();
$main_type = $main_attribute->get_type();
$attribute = $variation->get_attributes()->get_subterms();
$type = $attribute->get_type();
$terms = $attribute->get_terms();
@endphp
@php
$main_term_type = 'text';
$nocolor = false;
// if($main_type == 'color'){
// $main_term_type = 'color';
// $color = $variation->get_color();
// if(!empty($color)){
// $main_term_type = $color->get_type();
// $color = $color->get_color();
// }else{
// $nocolor = true;
// $color = '';
// }
// }
// $class_main_term = ['order-product-attribute', 'order-product-attribute-type-' . $main_type, 'attr-' . $main_term_type, 'attr-' . $main_term->get_slug()];
// if($nocolor){
// $class_main_term[] = 'attr-color-not-found';
// }
$class_main_term = ['order-product-attribute', 'order-product-attribute-type-text', 'attr-text', 'attr-' . $main_term->get_slug()];
@endphp
@if($main_term_type == 'text')
{{ $main_term->get_name() }}
@endif
@if($main_term_type == 'hex')
@endif
@if($main_term_type == 'image')
@endif
{{--
--}}
@foreach ($terms as $term)
@php
$term_type = 'text';
$class_term = ['order-product-term', 'order-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();
// $color = $color->get_color();
// }else{
// $nocolor = true;
// $color = '';
// }
// $class_term[] = 'order-product-term-' . $term_type;
// }else{
$class_term[] = 'order-product-term-text';
// }
// if($nocolor){
// $class_term[] = 'attr-color-not-found';
// }
@endphp
{{-- @if($type == 'color')
@if($term_type == 'hex')
@endif
@if($term_type == 'image')
@endif
@else
{{ $term->get_name() }}
@endif --}}
{{ $term->get_name() }}
{!! $term->get_quantity() !!}
@endforeach
{!! $variation->get_quantity() !!}
x {!! $product->get_price_html() !!}
{!! $variation->get_amount_html(true) !!}
@endforeach