LocalOrbit / localorbit

Local Orbit is an open source web application and service that empowers food hubs to efficiently sell and distribute local food.
https://localorbit.com
MIT License
16 stars 11 forks source link

Products prices show as $0.00 / $NaN in cart if all available prices removed after product added to cart #3502

Open rbarreca opened 5 years ago

rbarreca commented 5 years ago

Describe the bug If a buyer adds a product to her cart, then market manager removes all prices for that product, then buyer refreshes /cart she will see all products show as $0.00 / $NaN.

To Reproduce Steps to reproduce the behavior:

  1. Add a product to cart and click Checkout
  2. Notice product has the correct price
  3. As a market manager, go to that product's Prices tab and delete all prices
  4. Refresh /cart page as the buyer
  5. Notice product prices showing up as $0.00 / $NaN

Expected behavior Would expect an error message showing #{product.name} no longer available for purchase and a Rollbar.info to go out letting us know this happened (for further debugging/product improvements).

Screenshots image2

Additional context There seems to be more ways to repro this and more ramifications of this that are TBD.

User reports