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

Feature: get products in a price range #125

Open
gdlcf88 opened this issue Mar 19, 2022 · 0 comments
Open

Feature: get products in a price range #125

gdlcf88 opened this issue Mar 19, 2022 · 0 comments
Labels
enhancement New feature or request module-products

Comments

@gdlcf88
Copy link
Member

gdlcf88 commented Mar 19, 2022

image

Price is a property of the ProductSku entity. The ProductView caches the lowest and the highest price of a product:

public decimal? MinimumPrice { get; set; }
public decimal? MaximumPrice { get; set; }

That makes a price range query possible to implement. If a customer is querying from min to max, we can query ProductViews with MinimumPrice < max && MaximumPrice > min.

However, I found a problem. Given a product has 2 SKUs with price 100 and 800. When querying from 200 to 700, the result will contain this product. But the truth is that the latter doesn't have an SKU with a price from 200 to 700.

image

I am still looking for a way to resolve it.

@gdlcf88 gdlcf88 added enhancement New feature or request module-products labels Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module-products
Projects
None yet
Development

No branches or pull requests

1 participant