fix order detail, disable store pickup
This commit is contained in:
parent
e56dca452b
commit
8f40ce9ea8
|
|
@ -8,6 +8,7 @@ use App\Repositories\Member\Cart\MemberCartRepository;
|
|||
use App\Repositories\Member\ShippingRepository;
|
||||
use App\Repositories\Member\Transaction\TransactionRepository;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class CheckoutController extends Controller
|
||||
{
|
||||
|
|
@ -200,7 +201,7 @@ class CheckoutController extends Controller
|
|||
|
||||
} catch (\Exception $e) {
|
||||
|
||||
dd($e);
|
||||
Log::info($e);
|
||||
|
||||
return redirect()->route('checkout.delivery')->with('error', 'Invalid checkout data');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ return [
|
|||
'delivery_description' => 'We deliver to your address',
|
||||
'store_pickup' => 'Store Pickup',
|
||||
'pickup_description' => 'Pick up from our store',
|
||||
'pickup_not_available' => 'Pickup not available',
|
||||
'postcode' => 'Postcode',
|
||||
'postcode_placeholder' => 'e.g. 12345',
|
||||
'calculate_shipping' => 'Calculate Shipping',
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'order' => [
|
||||
'status' => [
|
||||
'wait_payment' => 'Wait Payment',
|
||||
],
|
||||
'status' => [
|
||||
'wait_payment' => 'Wait Payment',
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'delivery' => 'Delivery',
|
||||
'payment' => 'Payment',
|
||||
'order_date' => 'Order Date',
|
||||
'shipping_method' => 'Shipping method',
|
||||
'shipping_address' => 'Shipping address',
|
||||
'payment_method' => 'Payment method',
|
||||
'shipping' => 'Shipping',
|
||||
'estimated_total' => 'Estimated total',
|
||||
];
|
||||
|
|
@ -6,6 +6,7 @@ return [
|
|||
'delivery_description' => 'Kami mengirim ke alamat Anda',
|
||||
'store_pickup' => 'Ambil di Toko',
|
||||
'pickup_description' => 'Ambil dari toko kami',
|
||||
'pickup_not_available' => 'Pengambilan tidak tersedia',
|
||||
'postcode' => 'Kode Pos',
|
||||
'postcode_placeholder' => 'contoh: 12345',
|
||||
'calculate_shipping' => 'Hitung Ongkir',
|
||||
|
|
@ -33,4 +34,15 @@ return [
|
|||
'calculate_shipping_first' => 'Silakan hitung ongkir terlebih dahulu',
|
||||
'fill_required_fields' => 'Silakan isi semua field yang wajib diisi',
|
||||
'select_store' => 'Silakan pilih toko',
|
||||
'select_saved_address' => 'Pilih Alamat Tersimpan',
|
||||
'choose_address' => 'Pilih alamat',
|
||||
'add_new_address' => 'Tambah Alamat Baru',
|
||||
'primary' => 'Utama',
|
||||
'continue_to_shipping' => 'Lanjut ke Pengiriman',
|
||||
'choose_shipping' => 'Pilih Pengiriman',
|
||||
'payment' => 'Pembayaran',
|
||||
'delivery' => 'Pengiriman',
|
||||
'pickup' => 'Ambil di Toko',
|
||||
'pickup_ready' => 'Pesanan Anda akan siap diambil di toko yang dipilih',
|
||||
'continue_to_payment' => 'Lanjut ke Pembayaran',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'order' => [
|
||||
'status' => [
|
||||
'wait_payment' => 'Menunggu Pembayaran',
|
||||
],
|
||||
'status' => [
|
||||
'wait_payment' => 'Menunggu Pembayaran',
|
||||
],
|
||||
];
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'delivery' => 'Pengiriman',
|
||||
'payment' => 'Pembayaran',
|
||||
'order_date' => 'Tanggal Pemesanan',
|
||||
'shipping_method' => 'Metode Pengiriman',
|
||||
'shipping_address' => 'Alamat Pengiriman',
|
||||
'payment_method' => 'Metode Pembayaran',
|
||||
'shipping' => 'Pengiriman',
|
||||
'estimated_total' => 'Total Perkiraan',
|
||||
];
|
||||
|
|
@ -187,10 +187,10 @@
|
|||
Saving:
|
||||
<span class="text-danger fw-medium">Rp 0</span>
|
||||
</li>
|
||||
<li class="d-flex justify-content-between" id="tax-row" style="display: none;">
|
||||
{{-- <li class="d-flex justify-content-between" id="tax-row" style="display: none;">
|
||||
Tax collected:
|
||||
<span class="text-dark-emphasis fw-medium">Rp 0</span>
|
||||
</li>
|
||||
</li> --}}
|
||||
<li class="d-flex justify-content-between">
|
||||
Shipping:
|
||||
<span class="text-dark-emphasis fw-medium">Calculated at checkout</span>
|
||||
|
|
|
|||
|
|
@ -50,14 +50,14 @@
|
|||
<div class="col-md-6">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="deliveryMethod"
|
||||
id="pickupOption" value="pickup">
|
||||
id="pickupOption" value="pickup" disabled>
|
||||
<label class="form-check-label d-flex align-items-center"
|
||||
for="pickupOption">
|
||||
|
||||
<div>
|
||||
<div class="fw-medium">{{ __('checkout.store_pickup') }}</div>
|
||||
<div class="text-muted small">
|
||||
{{ __('checkout.pickup_description') }}</div>
|
||||
{{ __('checkout.pickup_not_available') }}</div>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@
|
|||
{{ __('cart_summary.savings') }}:
|
||||
<span class="text-danger fw-medium">Rp {{ number_format($savings, 0, ',', '.') }}</span>
|
||||
</li>
|
||||
<li class="d-flex justify-content-between" id="tax-row"
|
||||
{{-- <li class="d-flex justify-content-between" id="tax-row"
|
||||
@if ($tax <= 0) style="display: none;" @endif>
|
||||
{{ __('cart_summary.tax_collected') }}:
|
||||
<span class="text-dark-emphasis fw-medium">Rp {{ number_format($tax, 0, ',', '.') }}</span>
|
||||
</li>
|
||||
</li> --}}
|
||||
<li class="d-flex justify-content-between" id="shipping-row">
|
||||
{{ __('cart_summary.shipping') }}:
|
||||
<span class="text-dark-emphasis fw-medium">{{ __('cart_summary.calculated_at_checkout') }}</span>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
{{ $detail->reference->item->name ?? 'Product Name' }}
|
||||
</a>
|
||||
</h5>
|
||||
<div class="h6 mb-2">Rp {{ number_format($detail->unit_priceq ?? 0, 0, ',', '.') }}</div>
|
||||
<div class="h6 mb-2">Rp {{ number_format($detail->unit_price ?? 0, 0, ',', '.') }}</div>
|
||||
<div class="fs-xs">Qty: {{ $detail->qty ?? 1 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -48,43 +48,49 @@
|
|||
|
||||
<!-- Delivery + Payment info -->
|
||||
<div class="border-top pt-4">
|
||||
<h6>Delivery</h6>
|
||||
<h6>{{ __('order_detail.delivery') }}</h6>
|
||||
<ul class="list-unstyled fs-sm mb-4">
|
||||
<li class="d-flex justify-content-between mb-1">
|
||||
Tanggal Pemesanan:
|
||||
{{ __('order_detail.order_date') }}:
|
||||
<span class="text-body-emphasis fw-medium text-end ms-2">
|
||||
{{ $order?->created_at ?? '-' }}
|
||||
{{ \Carbon\Carbon::parse($order->created_at)->format('d M Y H:m:s') ?? '-' }}
|
||||
</span>
|
||||
</li>
|
||||
<li class="d-flex justify-content-between mb-1">
|
||||
Shipping method:
|
||||
{{ __('order_detail.shipping_method') }}:
|
||||
<span class="text-body-emphasis fw-medium text-end ms-2">
|
||||
{{ $order?->courier_company ?? 'Courier delivery' }} {{ $order?->courier_type ?? '' }}
|
||||
</span>
|
||||
</li>
|
||||
<li class="d-flex justify-content-between">
|
||||
Shipping address:
|
||||
<li class="d-flex justify-content-between mb-1">
|
||||
No Resi:
|
||||
<span class="text-body-emphasis fw-medium text-end ms-2">
|
||||
{{ $order?->waybill_number ?? '-' }}
|
||||
</span>
|
||||
</li>
|
||||
<li class="d-flex justify-content-between">
|
||||
{{ __('order_detail.shipping_address') }}:
|
||||
<span class="text-body-emphasis fw-medium text-end ms-2 text-wrap" style="max-width: 250px;">
|
||||
{{ $order?->address?->location ?? '-' }}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h6>Payment</h6>
|
||||
<h6>{{ __('order_detail.payment') }}</h6>
|
||||
<ul class="list-unstyled fs-sm m-0">
|
||||
<li class="d-flex justify-content-between mb-1">
|
||||
Payment method:
|
||||
{{ __('order_detail.payment_method') }}:
|
||||
<span class="text-body-emphasis fw-medium text-end ms-2">
|
||||
{{ $order?->payments->first()->method->payment_method ?? '-' }}
|
||||
</span>
|
||||
</li>
|
||||
<li class="d-flex justify-content-between mb-1">
|
||||
{{-- <li class="d-flex justify-content-between mb-1">
|
||||
Tax collected:
|
||||
<span class="text-body-emphasis fw-medium text-end ms-2">
|
||||
Rp {{ number_format($order?->tax ?? 0, 0, ',', '.') }}
|
||||
</span>
|
||||
</li>
|
||||
</li> --}}
|
||||
<li class="d-flex justify-content-between">
|
||||
Shipping:
|
||||
{{ __('order_detail.shipping') }}:
|
||||
<span class="text-body-emphasis fw-medium text-end ms-2">
|
||||
Rp {{ number_format($order?->shipping_price ?? 0, 0, ',', '.') }}
|
||||
</span>
|
||||
|
|
@ -94,7 +100,7 @@
|
|||
|
||||
<!-- Total -->
|
||||
<div class="d-flex align-items-center justify-content-between fs-sm border-top pt-4">
|
||||
Estimated total:
|
||||
{{ __('order_detail.estimated_total') }}:
|
||||
<span class="h5 text-end ms-2 mb-0">
|
||||
Rp {{ number_format($order?->total ?? 210590, 0, ',', '.') }}
|
||||
</span>
|
||||
|
|
@ -102,7 +108,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="offcanvas-header">
|
||||
{{-- <div class="offcanvas-header">
|
||||
<a class="btn btn-lg btn-secondary w-100" href="#!">Change the delivery time</a>
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
href="{{ route('orders') }}">
|
||||
<i class="ci-shopping-bag fs-base opacity-75 me-2"></i>
|
||||
{{ __('account_sidebar.orders') }}
|
||||
<span class="badge bg-primary rounded-pill ms-auto">1</span>
|
||||
{{-- <span class="badge bg-primary rounded-pill ms-auto">1</span> --}}
|
||||
</a>
|
||||
<a class="list-group-item list-group-item-action d-flex align-items-center"
|
||||
href="{{ route('second', ['account', 'wishlist']) }}">
|
||||
|
|
|
|||
Loading…
Reference in New Issue