Skip to content

Commit

Permalink
Wishlist fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Loydtafireyi committed Sep 18, 2020
1 parent 68fbbdc commit 5051e78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion resources/views/layouts/frontend.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ function gtag(){dataLayer.push(arguments);}
<div class="up-item">
<div class="shopping-card">
<i class="flaticon-heart"></i>
<span>{{ Cart::instance('wishlist')->count() }}</span>
@if(Cart::instance('wishlist')->count() != 0)
<span>{{ Cart::instance('wishlist')->count() }}</span>
@endif
</div>
<a href="{{ route('wishlist.index') }}">Wishlist</a>
</div>
Expand Down
7 changes: 6 additions & 1 deletion resources/views/product/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@
<input type="hidden" name="quantity" value="1">
<button type="submit" class="add-card"><i class="flaticon-bag"></i><span>ADD TO CART</span></button>
</form>
<form>
<form action="{{ route('wishlist.store') }}" method="post">
@csrf
<input type="hidden" name="id" value="{{$related->id}}">
<input type="hidden" name="name" value="{{$related->name}}">
<input type="hidden" name="price" value="{{$related->price}}">
<input type="hidden" name="quantity" value="1">
<button type="submit" class="wishlist-btn"><i class="flaticon-heart"></i></button>
</form>
</div>
Expand Down

0 comments on commit 5051e78

Please sign in to comment.