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

refactor: inventory status fixes and updated UI design #459

Merged
merged 18 commits into from
Jan 3, 2019

Conversation

kieckhafer
Copy link
Member

@kieckhafer kieckhafer commented Dec 13, 2018

BLOCKED BY reactioncommerce/reaction#4859
You can test this now by using branch feat-kieckhafer-inventoryUpdates of the core app, but this should not be merged until #4859 is merged into rc8.

Resolves #374 & reactioncommerce/reaction#4840
Impact: minor
Type: style && refactor

Issue

  • Inventory status badges were not displaying at all on the PDP.
  • Once they were fixed, and statuses were displaying, they were still displaying in the old design
  • Customers could add more inventory to their cart than was available

Solution

This update:

  1. Fixed the existing badge statuses so the data was working correctly
  2. Updated the GraphQL endpoint query to get more data which will be needed int he future (inventoryInStock, inventoryAvailableToSell)
  3. Updated the UI to match the new designs of a "badgeless" inventory update (see PDP: Badge is not shown/respected on PDP #374 for designs)
  4. Put a limit on the number of items a customer may purchase. The limit is equal to the new quantity data on each option / variant, inventoryAvailableToSell

Breaking changes

None

Testing

  1. Open the operator app and storefront.
  2. Change inventory on products to all different statuses: Sold out, low inventory, backorder, etc
  3. See that the starterkit matches the designs and correctly displays the right status
  4. See that you cannot choose a higher quantity of product to order than whatever is listed as the inventoryAvailableToSell on that particular variant / option

@kieckhafer kieckhafer changed the title refactor: inventory status fixes and updated UI design [WIP] refactor: inventory status fixes and updated UI design Dec 13, 2018
@kieckhafer kieckhafer changed the title [WIP] refactor: inventory status fixes and updated UI design refactor: inventory status fixes and updated UI design Dec 18, 2018
@kieckhafer kieckhafer requested a review from aldeed January 3, 2019 00:02
@aldeed aldeed merged commit fe2e264 into develop Jan 3, 2019
@aldeed aldeed deleted the feat-kieckhafer-inventoryUpdates branch January 3, 2019 16:19
This was referenced Jan 15, 2019
@spencern spencern mentioned this pull request Jan 25, 2019
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.

PDP: Badge is not shown/respected on PDP
2 participants