Wishlist Issue Fixed

This commit is contained in:
Devansh 2021-12-03 11:18:22 +05:30
parent c35817c3ad
commit 0141b3f2b6
1 changed files with 4 additions and 3 deletions

View File

@ -10,6 +10,9 @@
/* link making */
$href = isset($route) ? $route : ($wishlist ? route('customer.wishlist.remove', $wishlist->id) : route('customer.wishlist.add', $product->product_id));
/* method */
$method = isset($route) ? 'POST' : ( $wishlist ? 'DELETE' : 'POST' );
/* title */
$title = $wishlist ? __('velocity::app.shop.wishlist.remove-wishlist-text') : __('velocity::app.shop.wishlist.add-wishlist-text');
@endphp
@ -20,17 +23,15 @@
title="{{ $title }}"
onclick="submitWishlistForm(
'{{ $href }}',
'{{ $wishlist ? 'DELETE' : 'POST' }}',
'{{ $method }}',
'{{ csrf_token() }}'
)"
>
<wishlist-component active="{{ $wishlist ? false : true }}"></wishlist-component>
@if (isset($text))
{!! $text !!}
@endif
</a>
@endauth