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

Backorder flag applied incorrectly on PDP #4009

Closed
3 tasks done
spencern opened this issue Mar 15, 2018 · 0 comments · Fixed by #4151
Closed
3 tasks done

Backorder flag applied incorrectly on PDP #4009

spencern opened this issue Mar 15, 2018 · 0 comments · Fixed by #4151
Assignees
Labels
bug For issues that describe a defect or regression in the released software

Comments

@spencern
Copy link
Contributor

spencern commented Mar 15, 2018

Prerequisites

  • Are you running the latest version?
  • Are you able to consistently reproduce the issue?
  • Did you search the issue queue for existing issue?

Issue Description

As an admin, when creating a new product, the backorder badge is applied incorrectly. As seen in this image, the backorder badge is visible on the variant while the quantity is > 0. It seems that the backorder badge is being applied when the low inventory badge should be applied as an admin.
image

The backorder badge is also applied incorrectly on the consumer view of the PDP:
image

This seems to happen when viewing a product where the allow backorder toggle is enabled and the Quantity is <= the number provided in the Warn at input on the PDP.

The Admin Product Grid displays the correct badge
image

The new catalog based product grid displays most badges correctly, but when Allow backorder is enabled, the Low inventory badge never displays. This is incorrect. The Low inventory badge should always show when the quantity is greater than 0, but less than or equal to the warn at number.

When the quantity is equal to 0, the badge shown should be Backorder if Allow backorder is enabled, or Sold out if not.

Steps to Reproduce

Please provide starting context, i.e. logged in as a user, configure a particular payment method.

  1. Create a product
  2. Set the Quantity to 5
  3. Set the warn at number to 5
  4. Ensure that Allow backorder is enabled

Possible Solution

My best guess is that we're not using the same logic/helper to determine which badge is shown in all spots. We should probably have a single component that calculates which badge is shown so that it's consistent and correct across the app.

Versions

Node: 8.9.0
NPM: 5.6.0
Meteor Node: 8.9.4
Meteor NPM: 5.6.0
Reaction CLI: 0.29.0
Reaction: 1.9.0
Reaction branch: master
Docker: 17.12.0-ce
@spencern spencern added bug For issues that describe a defect or regression in the released software impact-major labels Mar 15, 2018
@Akarshit Akarshit self-assigned this Mar 18, 2018
@zenweasel zenweasel added this to the Albay milestone Mar 28, 2018
spencern added a commit that referenced this issue Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For issues that describe a defect or regression in the released software
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants