-
Notifications
You must be signed in to change notification settings - Fork 17
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
Enable checkout-summary.compact block to show a total value based on visible totalizers #38
Enable checkout-summary.compact block to show a total value based on visible totalizers #38
Conversation
Add a new prop to control how the total shown by the SummarySmall component is calculated. This enables the component to show total values calculated based only on visible totalizers.
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
Beep boop 🤖 I noticed you didn't make any changes at the
In order to keep track, I'll create an issue if you decide now is not a good time
|
It looks like that the link of the second workspace is not working =/ |
Updated it! Sorry about that 😅 |
Your PR has been merged! App is being published. 🚀 After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:
After that your app will be updated on all accounts. For more information on the deployment process check the docs. 📖 |
What problem is this solving?
Currently, the value received by the
totalizersToShow
prop is only taken into account to toggle the visibility of each totalizer, but doesn't have any effect in theTotal
value shown in theminicart.v2
. This can create weird behaviors, such as this one:In this image, the
Total
is greater thanSubtotal
because it takes into account theShipping
price. But sinceShipping
is not in being shown to users, it might be confusing.To avoid this, we're adding a new
totalCalculation
prop, that enables users to control whether or not thecheckout-summary.compact
should only take into account the visible totalizers to calculate theTotal
displayed to users.Also, we'll refrain from showing the
Shipping and taxes calculated at checkout.
disclaimer if theShipping
totalizer is already taken into account to show theTotal
price.How to test it?
Top Wood Clock
product to the cart. Theminicart.v2
should pop open, and you should see this at the bottom:Notice that the
Total
is greater than theSubtotal
. That's because there's a shipping cost being added. The problem here is that the client doesn't know that, and the disclaimer at the bottom is misleading in this case since the shipping cost is already being considered.This is now the default behavior, and the shipping cost is not taken into account.
In this case, the
checkout-summary.compact
block is configured as:How does this PR make you feel? 🔗