Merge pull request #5446 from devansh-webkul/wishlist-issue
Wishlist Issue Fixed #5445#issuecomment-997777539
This commit is contained in:
commit
eef4246585
|
|
@ -52,6 +52,7 @@
|
|||
|
||||
<div>
|
||||
@include('shop::products.add-to-cart', [
|
||||
'reloadPage' => true,
|
||||
'addWishlistClass' => 'pl10',
|
||||
'product' => $item->product,
|
||||
'addToCartBtnClass' => 'medium-padding',
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
* @param {!string} method
|
||||
* @param {!string} csrfToken
|
||||
*/
|
||||
function submitWishlistForm(action, method, csrfToken) {
|
||||
if (! confirm('{{ __('shop::app.checkout.cart.cart-remove-action') }}')) return;
|
||||
function submitWishlistForm(action, method, isConfirm, csrfToken) {
|
||||
if (isConfirm && ! confirm('{{ __('shop::app.checkout.cart.cart-remove-action') }}')) return;
|
||||
|
||||
let form = document.createElement('form');
|
||||
form.method = 'POST';
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@
|
|||
/* method */
|
||||
$method = isset($route) ? 'POST' : ( $wishlist ? 'DELETE' : 'POST' );
|
||||
|
||||
/* is confirmation needed */
|
||||
$isConfirm = isset($route) ? 'true' : 'false';
|
||||
|
||||
/* title */
|
||||
$title = $wishlist ? __('velocity::app.shop.wishlist.remove-wishlist-text') : __('velocity::app.shop.wishlist.add-wishlist-text');
|
||||
@endphp
|
||||
|
|
@ -24,6 +27,7 @@
|
|||
onclick="submitWishlistForm(
|
||||
'{{ $href }}',
|
||||
'{{ $method }}',
|
||||
{{ $isConfirm }},
|
||||
'{{ csrf_token() }}'
|
||||
)"
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue