Apply new field filters to products list query #399
-
Hello Guys, We tried to list some products with custom filters. I tried to look directly in the documentation but I don't see any detail regarding how to add new attributes filters swellClient.products.list({ I tried to "PUT" new permissions fields as recommended in documentation but it seems not working with filters or search function. Only to return additional fields in JSON. Thanks for your help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I assume that you use swell-js following this doc: $filters won't work for custom fields. Instead you can try the below snippet: swellClient.products.list({
...
expand: ["brand_detail"],
content: {
custom_field: "test"
}
}); On a side note, you don't need to open read permissions for content fields which is opened by default. But, you need to open up input fields for write permissions following the same documentation. |
Beta Was this translation helpful? Give feedback.
I assume that you use swell-js following this doc:
https://developers.swell.is/frontend-api/products
$filters won't work for custom fields. Instead you can try the below snippet:
On a side note, you don't need to open read permissions for content fields which is opened by default. But, you need to open up input fields for write permissions following the same documentation.