diff --git a/packages/Webkul/SAASPreOrder/src/Providers/SAASPreorderServiceProvider.php b/packages/Webkul/SAASPreOrder/src/Providers/SAASPreorderServiceProvider.php index b8fa8cee7..2c8969e30 100755 --- a/packages/Webkul/SAASPreOrder/src/Providers/SAASPreorderServiceProvider.php +++ b/packages/Webkul/SAASPreOrder/src/Providers/SAASPreorderServiceProvider.php @@ -42,7 +42,7 @@ class SAASPreOrderServiceProvider extends ServiceProvider // __DIR__ . '/../Resources/views/shop/products/view/product-add.blade.php' => resource_path('views/vendor/shop/products/view/product-add.blade.php'), __DIR__ . '/../Resources/views/admin/sales/orders' => resource_path('views/vendor/admin/sales/orders'), - // __DIR__ . '/../Resources/views/shop/customers/account/orders' => resource_path('views/vendor/shop/customers/account/orders'), + __DIR__ . '/../Resources/views/shop/customers/account/orders' => resource_path('views/vendor/shop/customers/account/orders'), ]); //model observer for all the core models of Bagisto diff --git a/resources/views/vendor/shop/customers/account/orders/view.blade.php b/resources/views/vendor/shop/customers/account/orders/view.blade.php new file mode 100755 index 000000000..f77967460 --- /dev/null +++ b/resources/views/vendor/shop/customers/account/orders/view.blade.php @@ -0,0 +1,414 @@ +@extends('shop::layouts.master') + +@section('page_title') + {{ __('shop::app.customer.account.order.view.page-tile', ['order_id' => $order->id]) }} +@endsection + +@push('css') + +@endpush + +@section('content-wrapper') + +
+ @include('shop::customers.account.partials.sidemenu') + +
+ + + + {!! view_render_event('bagisto.shop.customers.account.orders.view.before', ['order' => $order]) !!} + +
+ + + + + havePreOrderItems($order->id); + ?> + + @if ($havePreOrderItems) +
{{ __('preorder::app.shop.sales.orders.preorder-summary') }}
+ @endif + +
+
+
+ + {{ __('shop::app.customer.account.order.view.placed-on') }} + + + + {{ core()->formatDate($order->created_at, 'd M Y') }} + +
+
+
+ +
+
+ {{ __('shop::app.customer.account.order.view.products-ordered') }} +
+ +
+
+ + + + + + + + + + + + + + + + + @foreach ($order->items as $item) + + + + + + + + + + + + + + + + + + @endforeach + + +
{{ __('shop::app.customer.account.order.view.SKU') }}{{ __('shop::app.customer.account.order.view.product-name') }}{{ __('shop::app.customer.account.order.view.price') }}{{ __('shop::app.customer.account.order.view.item-status') }}{{ __('shop::app.customer.account.order.view.subtotal') }}{{ __('shop::app.customer.account.order.view.tax-percent') }}{{ __('shop::app.customer.account.order.view.tax-amount') }}{{ __('shop::app.customer.account.order.view.grand-total') }}
+ {{ $item->type == 'configurable' ? $item->child->sku : $item->sku }} + + {{ $item->name }} + + @if ($preOrderItem = $preOrderItemRepository->resetScope()->findOneByField('order_item_id', $item->id)) +
+ type == 'configurable')style="margin-top: 0"@endif> + {{ __('preorder::app.shop.sales.orders.preorder-information') }} + + + + {{ __('preorder::app.shop.sales.orders.type') }} + + {{ $preOrderItem->type_label }} + + + + {{ __('preorder::app.shop.sales.orders.status') }} + + {{ $preOrderItem->status_label }} + + + @if ($preOrderItem->payment_order_item) + + {{ __('preorder::app.shop.sales.orders.payment-order') }} + + + #{{ $preOrderItem->payment_order_item->order_id }} + + + @endif +
+ @elseif ($preOrderItem = app('Webkul\SAASPreOrder\Repositories\PreOrderItemRepository')->resetScope()->findOneByField('payment_order_item_id', $item->id)) +
+ type == 'configurable')style="margin-top: 0"@endif> + {{ __('preorder::app.shop.sales.orders.preorder-payment-information') }} + + + + {{ __('preorder::app.shop.sales.orders.reference-order') }} + + + #{{ $preOrderItem->order_id }} + + +
+ @endif +
{{ core()->formatPrice($item->price, $order->order_currency_code) }} + + {{ __('shop::app.customer.account.order.view.item-ordered', ['qty_ordered' => $item->qty_ordered]) }} + + + + {{ $item->qty_invoiced ? __('shop::app.customer.account.order.view.item-invoice', ['qty_invoiced' => $item->qty_invoiced]) : '' }} + + + + {{ $item->qty_shipped ? __('shop::app.customer.account.order.view.item-shipped', ['qty_shipped' => $item->qty_shipped]) : '' }} + + + + {{ $item->qty_canceled ? __('shop::app.customer.account.order.view.item-canceled', ['qty_canceled' => $item->qty_canceled]) : '' }} + + {{ core()->formatPrice($item->total, $order->order_currency_code) }}{{ number_format($item->tax_percent, 2) }}%{{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }} + {{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }} + + canBeComplete($item); ?> + + @if ($canBeComplete) + Complete Preorder + @endif +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ __('shop::app.customer.account.order.view.subtotal') }}-{{ core()->formatPrice($order->sub_total, $order->order_currency_code) }}
{{ __('shop::app.customer.account.order.view.shipping-handling') }}-{{ core()->formatPrice($order->shipping_amount, $order->order_currency_code) }}
{{ __('shop::app.customer.account.order.view.tax') }}-{{ core()->formatPrice($order->tax_amount, $order->order_currency_code) }}
{{ __('shop::app.customer.account.order.view.grand-total') }}-{{ core()->formatPrice($order->grand_total, $order->order_currency_code) }}
{{ __('shop::app.customer.account.order.view.total-paid') }}-{{ core()->formatPrice($order->grand_total_invoiced, $order->order_currency_code) }}
{{ __('shop::app.customer.account.order.view.total-refunded') }}-{{ core()->formatPrice($order->grand_total_refunded, $order->order_currency_code) }}
{{ __('shop::app.customer.account.order.view.total-due') }}-{{ core()->formatPrice($order->total_due, $order->order_currency_code) }}
+
+
+
+
+ + @if ($order->invoices->count()) + + + @foreach ($order->invoices as $invoice) + +
+
+ {{ __('shop::app.customer.account.order.view.individual-invoice', ['invoice_id' => $invoice->id]) }} + + + {{ __('shop::app.customer.account.order.view.print') }} + +
+ +
+
+ + + + + + + + + + + + + + + + @foreach ($invoice->items as $item) + + + + + + + + + + @endforeach + +
{{ __('shop::app.customer.account.order.view.SKU') }}{{ __('shop::app.customer.account.order.view.product-name') }}{{ __('shop::app.customer.account.order.view.price') }}{{ __('shop::app.customer.account.order.view.qty') }}{{ __('shop::app.customer.account.order.view.subtotal') }}{{ __('shop::app.customer.account.order.view.tax-amount') }}{{ __('shop::app.customer.account.order.view.grand-total') }}
{{ $item->child ? $item->child->sku : $item->sku }}{{ $item->name }}{{ core()->formatPrice($item->price, $order->order_currency_code) }}{{ $item->qty }}{{ core()->formatPrice($item->total, $order->order_currency_code) }}{{ core()->formatPrice($item->tax_amount, $order->order_currency_code) }}{{ core()->formatPrice($item->total + $item->tax_amount, $order->order_currency_code) }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
{{ __('shop::app.customer.account.order.view.subtotal') }}-{{ core()->formatPrice($invoice->sub_total, $order->order_currency_code) }}
{{ __('shop::app.customer.account.order.view.shipping-handling') }}-{{ core()->formatPrice($invoice->shipping_amount, $order->order_currency_code) }}
{{ __('shop::app.customer.account.order.view.tax') }}-{{ core()->formatPrice($invoice->tax_amount, $order->order_currency_code) }}
{{ __('shop::app.customer.account.order.view.grand-total') }}-{{ core()->formatPrice($invoice->grand_total, $order->order_currency_code) }}
+
+
+
+ + @endforeach + +
+ @endif + + @if ($order->shipments->count()) + + + @foreach ($order->shipments as $shipment) + +
+
+ {{ __('shop::app.customer.account.order.view.individual-shipment', ['shipment_id' => $shipment->id]) }} +
+ +
+ +
+ + + + + + + + + + + + @foreach ($shipment->items as $item) + + + + + + + + @endforeach + + +
{{ __('shop::app.customer.account.order.view.SKU') }}{{ __('shop::app.customer.account.order.view.product-name') }}{{ __('shop::app.customer.account.order.view.qty') }}
{{ $item->sku }}{{ $item->name }}{{ $item->qty }}
+
+
+
+ + @endforeach + +
+ @endif +
+ +
+
+
+
+
+ {{ __('shop::app.customer.account.order.view.shipping-address') }} +
+ +
+ + @include ('admin::sales.address', ['address' => $order->billing_address]) + +
+
+ +
+
+ {{ __('shop::app.customer.account.order.view.billing-address') }} +
+ +
+ + @include ('admin::sales.address', ['address' => $order->shipping_address]) + +
+
+ +
+
+ {{ __('shop::app.customer.account.order.view.shipping-method') }} +
+ +
+ + {{ $order->shipping_title }} + +
+
+ +
+
+ {{ __('shop::app.customer.account.order.view.payment-method') }} +
+ +
+ {{ core()->getConfigData('sales.paymentmethods.' . $order->payment->method . '.title') }} +
+
+
+
+
+ +
+ + {!! view_render_event('bagisto.shop.customers.account.orders.view.after', ['order' => $order]) !!} + +
+ +
+ +@endsection diff --git a/resources/views/vendor/shop/products/add-buttons.blade.php b/resources/views/vendor/shop/products/add-buttons.blade.php new file mode 100644 index 000000000..76d0a7409 --- /dev/null +++ b/resources/views/vendor/shop/products/add-buttons.blade.php @@ -0,0 +1,36 @@ +@if ($product->type != "configurable" && $product->totalQuantity() < 1 && $product->allow_preorder) + @if (core()->getConfigData('preorder.settings.general.percent')) + @if (core()->getConfigData('preorder.settings.general.preorder_type') == 'partial') +

{{ __('preorder::app.shop.products.percent-to-pay', ['percent' => core()->getConfigData('preorder.settings.general.percent')]) }}

+ @endif + @else +

{{ __('preorder::app.shop.products.nothing-to-pay') }}

+ @endif +@endif + +@if ($product->type == "configurable") +
+ + {{ __('shop::app.products.add-to-cart') }} + + + @include('shop::products.wishlist') +
+@else +
+
+ @csrf + + + + + @if ($product->totalQuantity() < 1 && $product->allow_preorder) + + @else + + @endif +
+ + @include('shop::products.wishlist') +
+@endif \ No newline at end of file diff --git a/resources/views/vendor/shop/products/view/product-add.blade.php b/resources/views/vendor/shop/products/view/product-add.blade.php new file mode 100644 index 000000000..1903ae6ba --- /dev/null +++ b/resources/views/vendor/shop/products/view/product-add.blade.php @@ -0,0 +1,25 @@ +{!! view_render_event('bagisto.shop.products.view.product-add.after', ['product' => $product]) !!} + +
+ @if ($product->type != 'configurable') + @if ($product->totalQuantity() < 1 && $product->allow_preorder) + + @else + @include ('shop::products.add-to-cart', ['product' => $product]) + + @include ('shop::products.buy-now') + @endif + @else + @include ('shop::products.add-to-cart', ['product' => $product]) + + @include ('shop::products.buy-now') + + + @endif +
+ +{!! view_render_event('bagisto.shop.products.view.product-add.after', ['product' => $product]) !!} \ No newline at end of file