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

Products at mulitple Stock Locations appear as unique variants #2868

Closed
jacobherrington opened this issue Sep 26, 2018 · 8 comments
Closed
Labels
type:bug Error, flaw or fault

Comments

@jacobherrington
Copy link
Contributor

jacobherrington commented Sep 26, 2018

Steps to reproduce

1. Create a store with two (or three) Stock Locations.
screen shot 2018-09-25 at 7 23 06 pm 1
2. Choose a product with no variants (I used the RoR Mug).
3. Add stock to the product in each location.
screen shot 2018-09-25 at 7 30 16 pm
4. Create a new order from admin/orders and try to add the item. You will see the two (or three) variants with the same SKU.
screen shot 2018-09-25 at 7 23 58 pm

Expected behavior

One variant should exist in the dropdown, regardless of the number of Stock Locations.

Please correct me if this is not ideal.

Actual behavior

There are as many variants listed in the drop down as there are Stock Locations with stock.

System configuration

Solidus Version: 2.7.0

Extensions in use: Sandbox

@mayanktap
Copy link
Contributor

Hi @jacobherrington , I am able to reproduce this issue in my local machine and tried to fix. I guess I would be able to fix this.
I would like to work on this. Can I ?

@jacobherrington
Copy link
Contributor Author

Please do @mayanktap! Let me know if you need help and I'll try to give you some guidance. :)

@mayanktap
Copy link
Contributor

@jacobherrington , According to my understanding and investigation, I made some changes and tested it thoroughly. I will raise the PR so that you can review and take decision accordingly.
I would just need some guidance in the process of making PR.

I want to verify one point regarding the process of raising PR:
1.) I am raising PR as base branch as master. That means the new branch that I will create to push the change will be from master branch. Is it correct?

@mayanktap
Copy link
Contributor

mayanktap commented Oct 6, 2018

Also , Is there any naming convention regarding the name of the branch? I didn't find anything related to this in CONTRIBUTION documentation.

@jacobherrington
Copy link
Contributor Author

Wow that's great 🎉

Yes, we usually branch off of master and PR back to master and branch names aren't a big deal to Solidus.

Thanks a ton for your help! 👍

@mayanktap
Copy link
Contributor

Ok then I will raise the PR after another round of testing.

@mayanktap
Copy link
Contributor

@jacobherrington . Please check the above PR #2898 raised corresponding to the issue.

@jacobherrington jacobherrington added type:bug Error, flaw or fault UI labels Nov 21, 2018
spaghetticode pushed a commit to spaghetticode/solidus that referenced this issue Jan 29, 2019
Variants are counted multiple times when they have stock in multiple stock
locations. Adding `distinct` fixes this behavior. Fixes solidusio#2868
mayanktap added a commit to mayanktap/solidus that referenced this issue Jan 29, 2019
Variants are counted multiple times when they have stock in multiple stock
locations. Adding `distinct` fixes this behavior. Fixes solidusio#2868
@mayanktap
Copy link
Contributor

Please refer to this new PR(#3063) for the fix of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error, flaw or fault
Projects
None yet
Development

No branches or pull requests

2 participants