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

Move logic away from ApiCatalogBrowseFiltersController to make it extendable #300

Open
asvishnyakov opened this issue Dec 9, 2019 · 2 comments

Comments

@asvishnyakov
Copy link
Contributor

asvishnyakov commented Dec 9, 2019

private IList<AggregationProperty> GetAllProperties(string catalogId, IEnumerable<string> currencies)
{
var result = _propertyService.GetAllCatalogProperties(catalogId)
.Select(p => new AggregationProperty { Type = _attributeType, Name = p.Name })
.ToList();
result.AddRange(currencies.Select(c => new AggregationProperty { Type = _priceRangeType, Name = $"Price {c}", Currency = c }));
result.Add(new AggregationProperty { Type = _attributeType, Name = $"__outline" });
return result;

Expected behavior

We should have ability to extend the list of filtration properties

Actual behavior

We can't do that.

Steps to reproduce

--

@Woland2k
Copy link
Contributor

Woland2k commented Dec 9, 2019

Would be helpful to understand the scenario for which it needs to be extended.

@asvishnyakov
Copy link
Contributor Author

@Woland2k We want to add custom aggregation property to receive it as part of aggregations of product in storefront and show the number of products available in filter, for example. Right now the only thing we can do is to hard code it in theme or "emulate" aggregations in storefront

@yecli yecli added this to the Operations milestone Dec 11, 2019
@kostyrin kostyrin self-assigned this Dec 16, 2019
@t13ka t13ka removed this from the Operations milestone Dec 25, 2019
@t13ka t13ka assigned t13ka and unassigned kostyrin Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants