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

Logging-in with basket products may cause order lines to have incorrect partner / stock record #4164

Open
st8st8 opened this issue Sep 4, 2023 · 3 comments

Comments

@st8st8
Copy link
Contributor

st8st8 commented Sep 4, 2023

Found a bug? Please fill out the sections below.

Issue Summary

When logging in to Oscar with products in your basket, if that causes the Partner Strategy to change then the basket price updates, but the partner and stock record does not. This is turn is reflected in the resulting Order record.

Steps to Reproduce

  1. Set up a shop where certain users have a different strategy / partner to the anonymous user for a given product
  2. Visit the shop without logging in
  3. Add the product to your basket
  4. Log in to oscar
  5. Check out and complete the order

Now the lines in the frozen basket and resultant order will have the correct price, but the wrong partner and stock record. It would be helpful if this was correct as I'm now auditing past purchases based on the partner and stock record.

Technical details

Any python/Djange version, Oscar 3.2

@viggo-devries
Copy link
Contributor

Hi,

I understand.

Could you please create a test for this on a branch maybe that shows this unwanted behaviour?

And would you be willing to work on this issue yourself? I can point you to the right way of going about fixing it.

@st8st8
Copy link
Contributor Author

st8st8 commented Sep 12, 2023

Yeah, i can look at this. Leave it with me for now.

@st8st8
Copy link
Contributor Author

st8st8 commented Sep 29, 2023

OK, I've added a couple of tests in a branch, along with a potential fix:

https://github.com/st8st8/django-oscar/tree/partner_basket

I'll give this a run out in my shops for a bit and see what happens.

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

No branches or pull requests

2 participants