- Posts: 107
- Thank you received: 1
Module to filter and sort products in the frontend
Please Log in or Create an account to join the conversation.
We worked on this feature and it will be included in the next version of Business version Hikashop.
This version should be available in few days.
Please Log in or Create an account to join the conversation.
I also wanted to know if there is any chance of putting a button to clear all filters, if they have been applied several at once. For example, if a user has applied a filter to show the products of a single manufacturer, and also if put to display sorted by name, if it would be possible to add a button to delete the two filters to time, instead of manually deleting one and then the other.
Thanks for your help, greetings.
Please Log in or Create an account to join the conversation.
Could you please give me a link to your website so I can take a look at your filters and product?
About the reset button, it's also something we already implemented, it will be available in the next version of Hikashop which should be released today or tomorrow
Please Log in or Create an account to join the conversation.
I enabled the three filters price so you can see what they do.
I am attaching a screenshot in which you frame the filters that give problems.
Thank you for your help.
Please Log in or Create an account to join the conversation.
It looks like something we already fixed, do you have the last version of Hikashop?
I yes, I'll need a backend access to find the origin of the issue, you can PM me these informations .
Please Log in or Create an account to join the conversation.
Do you mind if I install the last version of Hikashop on your website? It should be out soon and it will still update.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
It comes from the namekeys in the data which are not unique.
So you can either give me a database access so I can change set the filter_namekey column as a unique or you can do it yourself.
Then, you'll have to recreate your filters so they'll have a unique namekey.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I will take a look at it.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
That was not easy at all
In the end problem was coming from the fact your product had a product_tax_id set while this tax rate wasn't existing anymore.
So the SQL query was looking for product with this tax id.
We solved the issue and it looks like the filters are working again
Please Log in or Create an account to join the conversation.
SELECT DISTINCT b.* FROM #__hikashop_product_category AS a LEFT JOIN (SELECT * FROM #__hikashop_product AS product2 LEFT JOIN #__hikashop_price AS price2 ON product2.product_id=price2.price_product_id WHERE (price2.price_access = 'all' OR price2.price_access LIKE '%,1,%' OR ISNULL(price2.price_access)) AND product2.product_type='main' GROUP BY product2.product_id ORDER BY price2.price_min_quantity ASC) AS b ON a.product_id=b.product_id INNER JOIN #__hikashop_category AS Ordenar_por_Precio_11 ON Ordenar_por_Precio_11.category_id=a.category_id AND b.product_manufacturer_id IN (398) WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (289) AND (b.product_access = 'all' OR b.product_access LIKE '%,1,%') AND ( ( case when b.price_currency_id IS NULL then 0 when b.price_currency_id = '1' and b.product_tax_id = '207' then b.price_value+b.price_value*0.21 when b.price_currency_id = '1' and b.product_tax_id = '11' then b.price_value+b.price_value*0 when b.price_currency_id = '1' and b.product_tax_id NOT IN ('207','11','0') then b.price_value end ) >= 0 ) ORDER BY a.ordering ASC
The "product_tax_id" what I have in mind for when I import products from a CSV file, because that properly respects me prices include VAT. I'll try to do an import to see if it works well.
Price filters work well, thanks.
Please Log in or Create an account to join the conversation.
I should work now.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The column "product_code" is twice in your CSV. Only the second column data will be taken into account.
The column "categories" is twice in your CSV. Only the second column data will be taken into account.
The column "product_manufacturer_id" is twice in your CSV. Only the second column data will be taken into account.
The column "product_name" is twice in your CSV. Only the second column data will be taken into account.
The column "product_description" is twice in your CSV. Only the second column data will be taken into account.
The column "images" is twice in your CSV. Only the second column data will be taken into account.
The column "price_value" is twice in your CSV. Only the second column data will be taken into account.
The column "price_value_with_tax" is twice in your CSV. Only the second column data will be taken into account.
The column "product_tax_id" is twice in your CSV. Only the second column data will be taken into account.
For example, my CSV file has this structure:
Greetings.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
However I do not understand why filters wouldn't work. What's the matter?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.