Developer forum

Forum » Ecommerce - Standard features » Guidance on a price filter with prices in the PriceMatrix

Guidance on a price filter with prices in the PriceMatrix

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I am trying to set up a price filter / facet but run into some issues. My products (they are all variants) don't have a fallback price (it's always zero) and all prices are stored in EcomPrices. They are all in a single currency.

What do I need to do to set up a range filter (like a slider or checkboxes) in the frontend? I can set up the filter against the default price and then the UI works, but my price range is always zero (which makes sense since the products' prices are zero). When I try to add other price fields to the index, I can see some dynamically generated fields with a price per country. Should I use these? And then what do I build the facets and filters against?

Would be nice to have some guidance or documentation on this.

Thanks!

Imar


Replies

 
Nicolai Pedersen
Reply

I think the problem is that in a Dynamicweb context, a price is not just a price. The same product may have a price in DKK with and without vat depending on if you are b2b or b2c customer. Then you might have the price in EUR - but it can be different in DE and NL because of different VAT in those countries. Or just because you as a shop owner have different prices in different countries. Also in b2b scenarios there are customer specific prices.

So there is no one way of doing it.

This is also why you have multiple price fields in the index. The 'default' price field is the products default price in default currency - in your case 0 and hence useless.

Then you have a number of fields where prices have been calculated taking some of the price metrics into consideration. Currency, Country and VAT. So it sounds like in your case you want to go with  one of those fields. Now you only have one country and one currency - so that is probably simple to make that decision, so you basically just have to choose between with or without vat.

 

You must be logged in to post in the forum