Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="row" id="dw">
- <div class="col-md-8">
- @card
- @slot('title')
- @endslot
- <div class="row">
- <div class="col-md-4">
- <!-- SUBMIT DIJALANKAN KETIKA TOMBOL DITEKAN -->
- <form action="{{route('order.checkout')}}" @submit.prevent="addToCart" method="POST">
- @csrf
- <div class="form-group">
- <label for="">product</label>
- <select @change="mounted()" name="product_id" id="product_id"
- v-model="cart.product_id"
- class="form-control" required width="100%">
- <option value="">Pilih</option>
- @foreach ($products as $product)
- <option value="{{ $product->id }}">{{ $product->code }} - {{ $product->title }}</option>
- @endforeach
- </select>
- </div>
- <div class="form-group">
- <label for="">Qty</label>
- <input type="number" name="qty"
- v-model="cart.qty"
- id="qty" value="1"
- min="1" class="form-control">
- </div>
- <div class="form-group">
- <button class="btn btn-primary btn-sm"
- :disabled="submitCart"
- >
- <i class="fa fa-shopping-cart"></i> {{ $product->submitCart ? 'Loading...':'Ke Keranjang' }}
- </button>
- </div>
- </form>
- </div>
- <!-- MENAMPILKAN DETAIL PRODUCT -->
- <div class="col-md-5">
- <h4>Detail product</h4>
- <div v-if="product.title">
- <table class="table table-stripped">
- <tr>
- <th>Kode</th>
- <td>:</td>
- <td>{{ $product->code }}</td>
- </tr>
- <tr>
- <th width="3%">product</th>
- <td width="2%">:</td>
- <td>{{ $product->title }}</td>
- </tr>
- <tr>
- <th>Harga</th>
- <td>:</td>
- <td>Rp. @convert($product->price) </td>
- </tr>
- </table>
- </div>
- </div>
- <!-- MENAMPILKAN IMAGE DARI PRODUCT -->
- <div class="col-md-3" v-if="product.photo">
- <img src="/uploads/product/{{$product->photo}}"
- height="150px"
- width="150px"
- :alt="product.title">
- </div>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement