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

Bug if variant price is updated while it's already in a cart #1818

Closed
myriamboure opened this issue Sep 8, 2017 · 5 comments
Closed

Bug if variant price is updated while it's already in a cart #1818

myriamboure opened this issue Sep 8, 2017 · 5 comments
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.

Comments

@myriamboure
Copy link
Contributor

Use case:

  • the product "pasta" is at 5€
    screenshot from 2017-09-08 11-03-26
  • a customer has put in his cart
    screenshot from 2017-09-08 11-04-35
  • the hub/producer realise he has forgotten to update the price, so he goes in admin and update to 7€ and save modifications
    screenshot from 2017-09-08 11-05-55
  • meanwhile, the customer went for a coffee, he is back on his computer and want to finish his order, he still sees the pasta in the basket at 5€ (he has not refreshed the page). He click on checkout, everything works normally, he has no clue that the price has change and can proceed tiil checkout, but he realize just before finalizing that he might have forgotten something, so he clicks on "back to cart", the pasta are still at 5€ but if you click on the top right basket they have switched to 7€
    screenshot from 2017-09-08 11-09-26
    -If I go back to the shop now I see the pasta are 7€ and I see I have 1 for 7€, but if I go back to my cart it's still 5€
    screenshot from 2017-09-08 11-12-28
    screenshot from 2017-09-08 11-13-12
    -If I decide I want finally 2 packs of pasta it show 14€ and if I go to my cart I still see 10€ (2x5€) instead of 14€, but I see 14€ in the top right cornerbasket
    screenshot from 2017-09-08 11-15-57
    screenshot from 2017-09-08 11-16-13

Desired behaviour:
Until I am on the checkout page, if a price is modified, the price is updated in my cart and a notification let me know that "the price of a product has changed" a bit like it is done today if the stock of a product has become insufficient. That should work both for the cart page but also for the top right cornet basket, it should be clear that the price of a product has change before I proceed to checkout.

Feedbacks welcome before I go more into details into the specification and draw images of how we want that to happen :-)
Ping @enricostano @lin-d-hop @kirstenalarsen @sstead

@enricostano anychance that can be solved in the Spree 2.0 ?

The other french platform don't allow to modify a product when it's created, if a producer want to change the price they have to create another product, so that they don't loose track of the history transactions connected to the products, etc. And also probably to avoid the kind of issue we see there, they forbid to change the price of a product when a sale is open (to make sure all the client of a given sale are buying in the same conditions). Maybe that discussion worth a Discourse thread? But anyway needed to report the bug here.

@myriamboure myriamboure added the bug label Sep 8, 2017
@sauloperez
Copy link
Contributor

if a price is modified, the price is updated in my cart and a notification let me know that "the price of a product has changed"

What do you exactly mean by this? would that happen in realtime?

The other french platform don't allow to modify a product when it's created, if a producer want to change the price they have to create another product

This sounds way better. Agree on the discourse thread so that we investigate Spree 2.0 and discuss the solution there.

@myriamboure myriamboure added bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. and removed bug labels Jul 13, 2018
@luisramos0
Copy link
Contributor

luisramos0 commented Sep 24, 2019

For some reason I came to this issue.
This probably needs to be retested in v2 and see if it is still a problem.

Anyway, I dont think we need to create a new product to change the price ⚠️
I think the spree data model is good for this (line_item.price and line_item.currency), when the item is added to the cart, the price is also copied to the line item. If the product price changes the line_item still contains the original price (this is essential for completed orders!).
So, I think the data model is good, we just need to see how the system is behaving and adapt it as we want.
The most obvious solution is to update all carts (all open orders) with the product when the price of the product is changed.

@sauloperez
Copy link
Contributor

I'm not sure, from the point of view of the shopper, if that would be desirable at any stage of the purchase, even more on the checkout page. Also, how often do we hear about this issue? @RachL @lin-d-hop @kirstenalarsen

@RachL
Copy link
Contributor

RachL commented Sep 10, 2020

The most obvious solution is to update all carts (all open orders) with the product when the price of the product is changed.

I agree with this as long as it indeed concerns only the cart page. From what I've understood so far, we don't differentiate the cart state and the checkout page, but maybe I've misunderstood. We can't let the price change during checkout, but on the cart page it's ok as the checkout still allows the shopper to cancel buying the product if the new price is too high.

It relates to the conversation here: https://community.openfoodnetwork.org/t/secure-products-availability-during-checkout-process/1933 for which I'm guessing I should say "product" but "line items"?

@lin-d-hop
Copy link
Contributor

This is a bit of an edge case and the logic seems not to be the problem. Let's reopen if the issue is reported on the new checkout flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.
Projects
None yet
Development

No branches or pull requests

5 participants