-
Notifications
You must be signed in to change notification settings - Fork 349
feat: Add items stock/backorder messages to cart page #2758
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| "@bigcommerce/catalyst-core": minor | ||
| --- | ||
|
|
||
| Add the following messages to each line item on cart page based on store inventory settings: | ||
| - Fully/partially out-of-stock message if enabled on the store and the line item is currently out of stock | ||
| - Ready-to-ship quantity if enabled on the store | ||
| - Backordered quantity if enabled on the store | ||
|
|
||
| ## Migration | ||
| For existing Catalyst stores, to get the newly added feature, simply rebase the existing code with the new release code. The files to be rebased for this change to be applied are: | ||
| - core/app/[locale]/(default)/cart/page-data.ts | ||
| - core/app/[locale]/(default)/cart/page.tsx | ||
| - core/messages/en.json | ||
| - core/vibes/soul/sections/cart/client.tsx |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only question I have left here is related to the screenshot from your PR desc: If I have 4 in my cart, but only 3 are available in the store (where 1 is ready to ship, and 2 will be on backorder), what happens to the 4th item unaccounted for in the backorder messaging? Is the intent that clicking "Proceed to checkout" will return an error?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes. This is highlighting the error for the shopper to fix before "proceed to checkout". If they didn't fix the quantities, they will get the error of they attempt to checkout. I also changed the counter border color in case of quantity error to highlight the error (as in the updated screenshot in the PR description). |

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, are these messages translated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the admin setup is still in progress. As part of the final definition of done, the messages will be translated in the inventory service via the unified translations API.