@extends(EcommerceHelper::viewPath('customers.master')) @section('title', SeoHelper::getTitle()) @section('content') @if($orderProducts->isNotEmpty())
@foreach ($orderProducts as $orderProduct) @php $product = get_products([ 'condition' => [ 'ec_products.id' => $orderProduct->product_id, ], 'take' => 1, 'select' => [ 'ec_products.id', 'ec_products.images', 'ec_products.name', 'ec_products.price', 'ec_products.sale_price', 'ec_products.sale_type', 'ec_products.start_date', 'ec_products.end_date', 'ec_products.sku', 'ec_products.is_variation', 'ec_products.status', 'ec_products.order', 'ec_products.created_at', ], ]); $hasDigitalFiles = $orderProduct->product_file_internal_count || $orderProduct->product_file_external_count; @endphp
{{ __('Digital Product') }}
@if ($hasDigitalFiles)
{{ __('Downloaded') }}: {{ $orderProduct->times_downloaded }} {{ __('times') }}
@endif
{{ $orderProduct->product_name }}
@if($product && $product->original_product?->url) {!! BaseHelper::clean($orderProduct->product_name) !!} @else {!! BaseHelper::clean($orderProduct->product_name) !!} @endif
@if ($sku = Arr::get($orderProduct->options, 'sku')) ({{ $sku }}) @endif @if ($attributes = Arr::get($orderProduct->options, 'attributes')) {{ $attributes }} @elseif ($product && $product->is_variation) @php $attributes = get_product_attributes($product->id) @endphp @if ($attributes->isNotEmpty()) @foreach ($attributes as $attribute) {{ $attribute->attribute_set_title }}: {{ $attribute->title }}@if (!$loop->last), @endif @endforeach @endif @endif @if (is_plugin_active('marketplace') && ($product = $orderProduct->product) && $product->original_product->store?->id) {{ __('Sold by') }}: {{ $product->original_product->store->name }} @endif {{ __('Ordered at') }}: {{ $orderProduct->created_at->translatedFormat('M d, Y h:m') }}
@include( EcommerceHelper::viewPath('includes.cart-item-options-extras'), ['options' => $orderProduct->options] ) @if (!empty($orderProduct->product_options) && is_array($orderProduct->product_options)) {!! render_product_options_html($orderProduct->product_options, $orderProduct->price) !!} @endif @if ($orderProduct->license_code) @php $licenseCodes = $orderProduct->license_codes_array; $hasMultipleCodes = count($licenseCodes) > 1; @endphp
{{ $hasMultipleCodes ? trans('plugins/ecommerce::products.license_codes.codes') . ' (' . count($licenseCodes) . ')' : trans('plugins/ecommerce::products.license_codes.code') }}:
@if ($hasMultipleCodes)
@foreach ($licenseCodes as $index => $code)
{{ $index + 1 }}. {{ $code }}
@endforeach
@else {{ $licenseCodes[0] ?? $orderProduct->license_code }} @endif
@endif
@if ($hasDigitalFiles) @endif
@endforeach
{!! $orderProducts->links() !!}
@else @include(EcommerceHelper::viewPath('customers.partials.empty-state'), [ 'title' => __('No digital products!'), 'subtitle' => __('You have not purchased any digital products yet.'), ]) @endif @stop