Merge pull request #5425 from devansh-webkul/wishlist-confirm-issue
Wishlist confirm fixed #5424
This commit is contained in:
commit
df1c168133
|
|
@ -59,9 +59,9 @@
|
|||
@csrf
|
||||
|
||||
@foreach ($cart->items as $key => $item)
|
||||
|
||||
@php
|
||||
$productBaseImage = $item->product->getTypeInstance()->getBaseImage($item);
|
||||
|
||||
$product = $item->product;
|
||||
|
||||
$productPrice = $product->getTypeInstance()->getProductPrices();
|
||||
|
|
@ -73,7 +73,6 @@
|
|||
} else {
|
||||
$url_key = $product->url_key;
|
||||
}
|
||||
|
||||
@endphp
|
||||
|
||||
<div class="row col-12" v-if="!isMobileDevice">
|
||||
|
|
@ -128,15 +127,15 @@
|
|||
<div class="no-padding col-12 cursor-pointer fs16">
|
||||
@auth('customer')
|
||||
@if ($showWishlist)
|
||||
@if ($item->parent_id != 'null' ||$item->parent_id != null)
|
||||
<div @click="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')" class="alert-wishlist">
|
||||
@if ($item->parent_id != 'null' || $item->parent_id != null)
|
||||
<div class="alert-wishlist">
|
||||
@include('shop::products.wishlist', [
|
||||
'route' => route('shop.movetowishlist', $item->id),
|
||||
'text' => "<span class='align-vertical-super'>$moveToWishlist</span>"
|
||||
])
|
||||
</div>
|
||||
@else
|
||||
<div @click="removeLink('{{ __('shop::app.checkout.cart.cart-remove-action') }}')" class="alert-wishlist">
|
||||
<div class="alert-wishlist">
|
||||
@include('shop::products.wishlist', [
|
||||
'route' => route('shop.movetowishlist', $item->child->id),
|
||||
'text' => "<span class='align-vertical-super'>$moveToWishlist</span>"
|
||||
|
|
@ -207,11 +206,9 @@
|
|||
|
||||
@if (isset($item->additional['attributes']))
|
||||
<div class="row col-12 no-padding no-margin">
|
||||
|
||||
@foreach ($item->additional['attributes'] as $attribute)
|
||||
<b>{{ $attribute['attribute_name'] }} : </b>{{ $attribute['option_label'] }}</br>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
|
@ -235,9 +232,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
|
|
@ -286,7 +281,6 @@
|
|||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.checkout.cart.summary.after', ['cart' => $cart]) !!}
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</script>
|
||||
|
|
@ -295,6 +289,7 @@
|
|||
(() => {
|
||||
Vue.component('cart-component', {
|
||||
template: '#cart-template',
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
isMobileDevice: this.isMobile(),
|
||||
|
|
@ -308,6 +303,6 @@
|
|||
}
|
||||
}
|
||||
})
|
||||
})()
|
||||
})();
|
||||
</script>
|
||||
@endpush
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
{{-- mix versioned compiled files --}}
|
||||
<script type="text/javascript" src="{{ asset(mix('/js/manifest.js', 'themes/velocity/assets')) }}"></script>
|
||||
|
||||
<script type="text/javascript" src="{{ asset(mix('/js/velocity-core.js', 'themes/velocity/assets')) }}"></script>
|
||||
|
|
@ -33,6 +32,8 @@
|
|||
* @param {!string} csrfToken
|
||||
*/
|
||||
function submitWishlistForm(action, method, csrfToken) {
|
||||
if (! confirm('{{ __('shop::app.checkout.cart.cart-remove-action') }}')) return;
|
||||
|
||||
let form = document.createElement('form');
|
||||
form.method = 'POST';
|
||||
form.action = action;
|
||||
|
|
|
|||
Loading…
Reference in New Issue