|
14 | 14 | </h3>
|
15 | 15 |
|
16 | 16 | <p class="product-price">
|
17 |
| - {{ Session::get('currency_code') }} {{ number_format($product->price,2) }} |
| 17 | + {{ Session::get('currency_symbol') }} {{ number_format($product->price,2) }} |
18 | 18 | </p>
|
19 | 19 |
|
20 | 20 | <div>
|
21 | 21 |
|
22 | 22 | @if($product->qty >= 0)
|
23 | 23 | <form method="post" action="{{ route('cart.add-to-cart') }}">
|
24 |
| - {{ csrf_field() }} |
| 24 | + @csrf |
25 | 25 |
|
| 26 | + <input type="hidden" name="slug" value="{{ $product->slug }}"/> |
26 | 27 |
|
27 |
| - <input type="hidden" name="slug" value="{{ $product->slug }}"/> |
28 |
| - |
29 |
| - <div class="product-stock">In Stock</div> |
30 |
| - <hr> |
31 |
| - |
32 |
| - <div class="clearfix"></div> |
33 |
| - <div class="float-left" style="margin-right: 5px;"> |
34 |
| - <button type="submit" class="btn btn-primary" |
35 |
| - href="{{ route('cart.add-to-cart', $product->id) }}"> |
36 |
| - Add to Cart |
37 |
| - </button> |
38 |
| - </div> |
39 |
| - </form> |
40 |
| - |
41 |
| - @else |
42 |
| - <div class="product-stock text-danger ">Out of Stock</div> |
| 28 | + <div class="product-stock">In Stock</div> |
43 | 29 | <hr>
|
44 | 30 |
|
45 | 31 | <div class="clearfix"></div>
|
46 | 32 | <div class="float-left" style="margin-right: 5px;">
|
47 |
| - <button type="button" disabled class="btn btn-default"> |
| 33 | + <button type="submit" class="btn btn-primary" |
| 34 | + href="{{ route('cart.add-to-cart', $product->id) }}"> |
48 | 35 | Add to Cart
|
49 | 36 | </button>
|
50 | 37 | </div>
|
51 |
| - @endif |
| 38 | + </form> |
| 39 | + |
| 40 | + @else |
| 41 | + <div class="product-stock text-danger ">Out of Stock</div> |
| 42 | + <hr> |
| 43 | + |
| 44 | + <div class="clearfix"></div> |
| 45 | + <div class="float-left" style="margin-right: 5px;"> |
| 46 | + <button type="button" disabled class="btn btn-default"> |
| 47 | + Add to Cart |
| 48 | + </button> |
| 49 | + </div> |
| 50 | + @endif |
52 | 51 |
|
53 |
| - @if(Auth::check() && Auth::user()->isInWishlist($product->id)) |
54 |
| - <a class="btn btn-danger" title="Remove from Wish List" |
55 |
| - data-toggle="tooltip" href="{{ route('my-account.wishlist.remove', $product->slug) }}"> |
56 |
| - <i |
57 |
| - class="fa fa-heart"></i></a> |
58 |
| - @else |
59 |
| - <a class="btn btn-success" title="Add to Wish List" data-toggle="tooltip" |
60 |
| - href="{{ route('my-account.wishlist.add', $product->slug) }}"><i class="fa fa-heart"></i></a> |
61 |
| - @endif |
| 52 | + @if(Auth::check() && Auth::user()->isInWishlist($product->id)) |
| 53 | + <a class="btn btn-danger" title="Remove from Wish List" |
| 54 | + data-toggle="tooltip" href="{{ route('my-account.wishlist.remove', $product->slug) }}"> |
| 55 | + <i |
| 56 | + class="fa fa-heart"></i></a> |
| 57 | + @else |
| 58 | + <a class="btn btn-success" title="Add to Wish List" data-toggle="tooltip" |
| 59 | + href="{{ route('my-account.wishlist.add', $product->slug) }}"><i class="fa fa-heart"></i></a> |
| 60 | + @endif |
62 | 61 | </div>
|
63 | 62 | </div>
|
64 | 63 | </div>
|
|
0 commit comments