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

[DemoStore] Show CartSummary with 0$ carts #617

Merged
merged 1 commit into from
Mar 9, 2023
Merged

Conversation

max611
Copy link
Member

@max611 max611 commented Mar 3, 2023

Update the Cart logic for the Demo store to show the CartSummary component even if the cart total is 0$.

WHY are these changes introduced?

While testing with a store with free products, I could not checkout and figured we should allow checkout even with 0$ carts.

WHAT is this pull request doing?

Remove the cart?.cost?.subtotalAmount?.amount === '0.0' condition and simply validate that a cart is present.

HOW to test your changes?

Add 0$ product in your cart and ensure you see the Continue to checkout button from the cart view.

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes

@max611 max611 marked this pull request as ready for review March 3, 2023 19:25
Copy link
Contributor

@frandiox frandiox left a comment

Choose a reason for hiding this comment

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

Showing the cart summary without items is a bit weird, especially in the /cart route.
Would the following changes help in your situation?

@frandiox frandiox merged commit db9d44d into 2023-01 Mar 9, 2023
@frandiox frandiox deleted the cart_summary_0 branch March 9, 2023 06:44
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.

2 participants