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

Estimate work needed to remove items from cart if they run out of stock #12918

Open
RachL opened this issue Oct 15, 2024 · 3 comments
Open

Estimate work needed to remove items from cart if they run out of stock #12918

RachL opened this issue Oct 15, 2024 · 3 comments
Assignees
Labels
funded feature spike A time-boxed investigation/implementation to access suitability of a tool or feature
Milestone

Comments

@RachL
Copy link
Contributor

RachL commented Oct 15, 2024

⚠️ Please use clockify code #12476 Flower Farms

Description

- As a: shopper
- On page: /cart/XXX and /checkout/XXX
- I want to be able to do:

if one of the items i've added to my cart becomes out of stock I see a generic message telling me my cart was updated.

Shopper can dismiss the message. It should appear on all shopfront pages when products have become unavailable.

image

Acceptance Criteria & Tests

The spike results need to give a clear solution in terms of tech solution. And an estimate of the amount of work needed. No development should be started at this stage.

@RachL RachL added spike A time-boxed investigation/implementation to access suitability of a tool or feature funded feature labels Oct 15, 2024
@RachL RachL added this to the Flower farms milestone Oct 15, 2024
@github-project-automation github-project-automation bot moved this to All the things 💤 in OFN Delivery board Oct 15, 2024
@RachL RachL moved this from All the things 💤 to Dev ready 👋 in OFN Delivery board Oct 15, 2024
@mkllnk
Copy link
Member

mkllnk commented Oct 16, 2024

This should already be happening when adding to cart. Code references:

  • app/controllers/cart_controller.rb
  • app/assets/javascripts/darkswarm/services/cart.js.coffee
  • app/assets/javascripts/templates/out_of_stock.html.haml

@mkllnk
Copy link
Member

mkllnk commented Oct 16, 2024

And on the checkout pages, we redirect to the cart and display an error:

An item in your cart has become unavailable.

Code references:

  • app/controllers/checkout_controller.rb
  • app/controllers/concerns/order_stock_check.rb

Do we need to test this to confirm?

@RachL
Copy link
Contributor Author

RachL commented Oct 16, 2024

@mkllnk ah yes stupid me we could reuse the same message! However what we need to change is the fact that the user needs to remove the item themselves. Here we want to remove them automatically (with no action from the user). So no more redirection to cart when this happens.

@rioug rioug self-assigned this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
funded feature spike A time-boxed investigation/implementation to access suitability of a tool or feature
Projects
Status: Dev ready 👋
Development

No branches or pull requests

3 participants