Price Range filter behaviour

  • Posts: 889
  • Thank you received: 9
  • Hikashop Business
1 year 7 months ago #329866

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.24

Hi!

Price filter behaves strange.
When i display products in decreasing price order, the highest price is 278,90 but in the filter says 278.50, there is no price 278.50.

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 76510
  • Thank you received: 12007
  • MODERATOR
1 year 7 months ago #329884

Hi,

First, please note that there are no filters on your URL. So I'm not sure which page you're talking about on your website.
Also, note that the filter won't be able to take into account discounts on the prices.
Finally, a good alternative is to use the "product_sort_price" which is generated when product prices are saved in the backend. That allows for way faster processing as the system doesn't have to dynamically process the prices and can directly use the product_sort_price of the products. And that value can be modified manually if necessary to better reflect what you want to be taken into account for the filters.

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

  • Posts: 889
  • Thank you received: 9
  • Hikashop Business
1 year 7 months ago #329925

Hi,

I do use product_sort_price but my client also wants the price range filter. I will send you details in email.

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 76510
  • Thank you received: 12007
  • MODERATOR
1 year 7 months ago #329928

Hi,

You can use product_sort_price with the price range filter.
Just select it instead of "price" in the "apply on" setting of your filter.
I think that it will give better results since you're already using it (for the ordering I suppose ?)

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

  • Posts: 889
  • Thank you received: 9
  • Hikashop Business
1 year 7 months ago #329985

Hi,

I tried that but still there is strange behaviour.
I apllied the price filter on sort and now the price range says:
From: 10euros
To: 170euros

but the highest price is 278.

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 76510
  • Thank you received: 12007
  • MODERATOR
1 year 7 months ago #329997

Hi,

That means that the product_sort_price of the product with the price 278 is wrong.
Edit the product and save it once. That should update the product_sort_price and it should then work properly.

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

  • Posts: 889
  • Thank you received: 9
  • Hikashop Business
1 year 6 months ago #330078

Hi,

the products are imported to hikashop, all the fields are correct in database so why do we have to save each product to work correctly?
I tried that as you said and it did change the price range filter but why doesn't this work right now?

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 76510
  • Thank you received: 12007
  • MODERATOR
1 year 6 months ago #330103

Hi,

That means that the way you're importing the products data, the product_sort_price is not properly filled in.
And thus the product_sort_price of the products you never saved in the backend is 0 and thus that's why the filter seems to not be working properly where it fact the problem lies in the data it is using which isn't correct.
For example, if you're using the standard import system with a CSV, you need to have a product_sort_price column with the price you want to be used for each product in your CSV.

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

  • Posts: 889
  • Thank you received: 9
  • Hikashop Business
1 year 6 months ago #330195

Hi nicolas,

I noticed this behaviour in another website though, in a category that all products were added manually.

Thank you

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 76510
  • Thank you received: 12007
  • MODERATOR
1 year 6 months ago #330199

Hi,

Could it be that the prices on the listing are displayed with taxes ? That would explain the difference since the sort price is based on the prices without taxes.

The following user(s) said Thank You: verzevoul

Please Log in or Create an account to join the conversation.

  • Posts: 889
  • Thank you received: 9
  • Hikashop Business
1 year 6 months ago #330765

Can cursor filter variants (in a custom field)? (not main product data in a custom field) I think it doesnt.

Please Log in or Create an account to join the conversation.

  • Posts: 76510
  • Thank you received: 12007
  • MODERATOR
1 year 6 months ago #330791

Hi,

No, it can only base itself on the data in the main product, not the variants.

Please Log in or Create an account to join the conversation.

  • Posts: 889
  • Thank you received: 9
  • Hikashop Business
1 year 6 months ago #330812

I thought it so i created a custom field in the main product with the data i need to be filtered.
It doesn work that way eather. Cursor finds only one value on my custom field which is checkbox. The lower price always. Can I give you Url and backend data?

Please Log in or Create an account to join the conversation.

  • Posts: 76510
  • Thank you received: 12007
  • MODERATOR
1 year 6 months ago #330815

Hi,

Note that for cursor filters, you have several restrictions as to what you can do:
- if you activate the "dynamic display" setting of the filter, then it will only use the values in the products. So if you've entered a 100 values in the custom field, but only selected one of the values in the custom field of one of the products of the listing, then you'll only see that one value.
- since a cursor works on numbers, if you don't have numbers in your custom field but text, then the filter won't work properly. It could result in seeing only one value as it casts the text into a number and finds always the same number (0 or 1).
Now we could have a look yes. Please provide the details via our contact form along with a link to this thread and we can check on the situation:
www.hikashop.com/support/contact-us.html

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum