Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all cart items at once #5998

Merged
merged 8 commits into from
Apr 20, 2022

Conversation

ILDaviz
Copy link

@ILDaviz ILDaviz commented Mar 11, 2022

No description provided.

Copy link
Contributor

@ghermans ghermans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ILDaviz please also add the translations for the other languages

@Sanjaybhattwebkul
Copy link
Contributor

@ILDaviz
There should be a confirmation box before deleting all items from the cart.

@ILDaviz
Copy link
Author

ILDaviz commented Mar 16, 2022

@ILDaviz There should be a confirmation box before deleting all items from the cart.

Is there already a component or is it to be created?

@devansh-webkul
Copy link
Member

Hi @ILDaviz,

There is a modal component available in UI package.

@@ -128,6 +128,8 @@
<div class="misc-controls">
<a href="{{ route('shop.home.index') }}" class="link">{{ __('shop::app.checkout.cart.continue-shopping') }}</a>

<a href="{{ route('cart.remove.all.items') }}" class="link">{{ __('shop::app.checkout.cart.remove-all-items') }}</a>
Copy link
Member

@jitendra-webkul jitendra-webkul Mar 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use v-alert here like below

class="link" v-alert

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will work only in bliss theme

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll be finished this week 🙈

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll be finished this week see_no_evil

HI @ILDaviz
Are you working for Remove all cart items at once?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added alert

@@ -80,6 +80,9 @@
Route::delete('/cart/remove/{id}', [CartController::class, 'removeProductFromCart'])
->name('velocity.cart.remove.product');

Route::get('/cart/remove-all', [CartController::class, 'removeAllItems'])
Copy link
Member

@devansh-webkul devansh-webkul Apr 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not be the GET method. It should be DELETE or POST with CSRF Token.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devansh-webkul Ok! change method type

@jitendra-webkul jitendra-webkul merged commit af7ea4d into bagisto:master Apr 20, 2022
@devansh-webkul
Copy link
Member

Hi @ILDaviz,

Thanks for the contribution 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants