alert on cart & move to wishlist

This commit is contained in:
rahul shukla 2018-10-30 18:14:00 +05:30
parent 84d5ecf41e
commit a677d5d553
1 changed files with 13 additions and 4 deletions

View File

@ -68,13 +68,13 @@
<span class="control-error" v-if="errors.has('qty[{{$item->id}}]')">@{{ errors.first('qty') }}</span>
<span class="remove">
<a href="{{ route('shop.checkout.cart.remove', $item->id) }}">{{ __('shop::app.checkout.cart.remove-link') }}</a></span>
<a href="{{ route('shop.checkout.cart.remove', $item->id) }}" onclick="removeLink('Do you really want to do this?')">{{ __('shop::app.checkout.cart.remove-link') }}</a></span>
<span class="towishlist">
@if($item->parent_id != 'null' ||$item->parent_id != null)
<a href="{{ route('shop.movetowishlist', $item->id) }}">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
<a href="{{ route('shop.movetowishlist', $item->id) }}" onclick="removeLink('Do you really want to do this?')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
@else
<a href="{{ route('shop.movetowishlist', $item->child->id) }}">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
<a href="{{ route('shop.movetowishlist', $item->child->id) }}" onclick="removeLink('Do you really want to do this?')">{{ __('shop::app.checkout.cart.move-to-wishlist') }}</a>
@endif
</span>
</div>
@ -132,4 +132,13 @@
@endif
</section>
@endsection
@endsection
@push('scripts')
<script>
function removeLink(message){
if(!confirm(message))
event.preventDefault();
}
</script>
@endpush