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

Show the price for the number of selected parts #496

Merged
merged 6 commits into from
Aug 5, 2024
Merged

Conversation

Bouni
Copy link
Owner

@Bouni Bouni commented Jul 4, 2024

This is an attempt to make the messy price column more useful.

We now go through the price ranges and check for the number of selected parts (doable via the alike button fr example) in whch price range we are. Then return that as the price:

grafik

@Bouni
Copy link
Owner Author

Bouni commented Jul 4, 2024

I need to check better what 20-180 for example means.

Does that include 20 but not 180?
Why is there a gap to the next price range (20-180, 200-1180 and so on).
Are the prices always in the right order so that the first range automatically contains the minimum quantity for the price?

@Bouni Bouni requested a review from chmorgan July 4, 2024 15:18
partselector.py Outdated Show resolved Hide resolved
partselector.py Outdated Show resolved Hide resolved
@Bouni Bouni marked this pull request as ready for review July 31, 2024 13:50
@Bouni Bouni requested review from chmorgan and removed request for chmorgan July 31, 2024 14:16
@Bouni
Copy link
Owner Author

Bouni commented Aug 5, 2024

I added the sum as well, which makes sense in my opinion:

grafik

@Bouni
Copy link
Owner Author

Bouni commented Aug 5, 2024

But I found another issue, every part has a minimum price:

grafik

That piece of information is not in the parts database and if we want to show the correct price we would have to do an API call for every row in the results.
That would lead to hundrets if not thousends of requests which I guess is not what JLC / LCSC want us to do.

So we will not be able to show the real price for most parts 🤷🏽‍♂️

@Bouni Bouni merged commit 0c68acf into main Aug 5, 2024
2 checks passed
@Bouni Bouni changed the title WIP: Show the price for the number of selected parts Show the price for the number of selected parts Aug 5, 2024
@Bouni Bouni deleted the better-price-column branch September 30, 2024 08:24
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

Successfully merging this pull request may close these issues.

2 participants