Filter by price

filtering
price
products

#1

Is it possible to filter by price or would I have to get all the products and filter them once I have the data?


#2

Hey Joe! Good question. Currently you cannot filter product by price through the API so you’re right, you should filter on your end, once you have your products.

You can find the available filters for products (using the API) here - https://docs.moltin.com/#product-filtering

Thanks!
Matt & Moltin team


#3

This would be an awesome feature. +1 from me :tada:


#4

It would be great to have a filter option on the product for brand and category too as these are quite common filtering option on e-commerce sites


#5

The good news is that you can now filter by brand, category or collection ID :grinning:

You’ll find the syntax here - https://docs.moltin.com/#product-filtering i.e. eq(brand.id,{BRAND_ID})

Have a play and let us know if there are any issues!


#6

I meant on the actual product itself


#7

Not sure I understand, can you elaborate a little to help me?


#8

Say you want to filter products by brand, price and category


#9

@joe

As @Matt mentioned this is now possible. If you’re using the JS SDK (3.10.0):

Moltin.Products.Filter({ eq: { brand: { id: 'brand-id' } } }).All()

#10

Is there an update on when price filtering is available? A simple low to high and high to low would be great similar to how you do date sorting


#11

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.