@extends('back.layouts.master') @section('content')
@csrf

تایید تغییر قیمت

آیا میخواهید قیمت محصولات برند "{{ $brand->name }}" @if ($request->type == 'discount' || $request->type == 'fake_discount') %{{ $request->discount }} @elseif ($request->amount_type == 'percentage') %{{ $request->amount }} @else {{ number_format($request->amount) }} تومان @endif @if ($request->type == 'increase') افزایش یابد؟ @elseif ($request->type == 'decrease') کاهش یابد؟ @elseif ($request->type == 'fake_discount') تخفیف کیک داشته باشند؟ @else تخفیف واگعی داشته باشند؟ @endif
@if ($products->count())

لیست محصولات (لطفا محصولات را برای تغییر قیمت انتخاب کنید)

@foreach ($products as $product)
image
{{ $product->title }} ({{ $product->category->title ?? ''}})
قیمت قبلی:
قیمت جدید:
تخفیف قبلی:
تخفیف جدید:

@foreach ($product->prices()->where('stock', '>', 0)->get() as $price) @php $new_price = getNewPrice(request(), $price); @endphp
{{ $price->getAttributesValue() }}
@if ($price->salePrice() != $price->regularPrice()) {{ number_format($price->regularPrice()) }}
@endif {{ number_format($price->salePrice()) }}
@if ($new_price['discount_price'] != $new_price['regular_price']) {{ number_format($new_price['regular_price']) }}
@endif {{ number_format($new_price['discount_price']) }}
@if ($price->discount) {{ $price->discount }}% @endif
@if ($new_price['discount']) {{ $new_price['discount'] }}% @endif
@endforeach
@endforeach
@else

چیزی برای نمایش وجود ندارد!

@endif
@endsection @push('styles') @endpush @push('scripts') @endpush