[Skip to main content](#vessel-content)

#   Create a filter for "Price with VAT"

##

- **[Teto](/forum/user/8045-teto "View Teto's Profile")**
- [![Teto's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar8045_2012-09-12.png)](/forum/user/8045-teto "View Teto's Profile") Topic Author
- [ Offline](/forum/user/8045-teto)

Less More

- Posts: 184
- Thank you received: 4
-
- [](http://www.madeinvino.com)
-

14 years 3 months ago -  14 years 3 months ago [\#58933](#58933) by [Teto](/forum/user/8045-teto "View Teto's Profile")  *[Create a filter for "Price with VAT"](/forum/4-how-to/58933-create-a-filter-for-price-with-vat#58933 "Finally I bought the Business Version of Hika!  I do not know if the behavior is intentional or a bug.  I created a radio button filter for the price. I seems hika uses the price without VAT to filter the products. is it correct?  Is it possibile to use the price with VAT in the filter? I sell almost completely in Italy and for the customers is normal to see the price with VAT included.  I have also another question. I created 2 filters: - one for the price - the second one for the category The filters select the right product if I use them separately, if I use them together there are no result. (see the attachment)  Thanks you!")* was created by *[Teto](/forum/user/8045-teto "View Teto's Profile")*

Finally I bought the Business Version of Hika!

I do not know if the behavior is intentional or a bug.

I created a radio button filter for the price.
I seems hika uses the price without VAT to filter the products. is it correct?

Is it possibile to use the price with VAT in the filter?
I sell almost completely in Italy and for the customers is normal to see the price with VAT included.

I have also another question.
I created 2 filters:
- one for the price
- the second one for the category
The filters select the right product if I use them separately, if I use them together there are no result. (see the attachment)

*This attachment is hidden for guests.
Please log in or register to see it.*

Thanks you!

Last edit: 14 years 3 months ago by [Teto](/forum/user/8045-teto "View Teto's Profile"). Reason: add another question

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU4OTMzLWNyZWF0ZS1hLWZpbHRlci1mb3ItcHJpY2Utd2l0aC12YXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86316
- Thank you received: 14276
-
-

14 years 3 months ago [\#58985](#58985) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Create a filter for "Price with VAT"](/forum/4-how-to/58933-create-a-filter-for-price-with-vat#58985 "Finally I bought the Business Version of Hika!  I do not know if the behavior is intentional or a bug.  I created a radio button filter for the price. I seems hika uses the price without VAT to filter the products. is it correct?  Is it possibile to use the price with VAT in the filter? I sell almost completely in Italy and for the customers is normal to see the price with VAT included.  I have also another question. I created 2 filters: - one for the price - the second one for the category The filters select the right product if I use them separately, if I use them together there are no result. (see the attachment)  Thanks you!")*

The filtering system bases itself on the price without vat. That is indeed correct.

Having it rely on the price with tax will require some modifications. I think that it's possible.
I've made some modifications to the filtering system so that it can handle prices with taxes. Can you try to replace the file administrator/components/com_hikashop/classes/filter.php with this one ?

Regarding the second issue, I wouldn't be able to tell. Could you give the query which is used for the listing of the products when both filters are set ? (you can get the queries on the page at the bottom of the page when the debug mode of the joomla configuration is turned on)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU4OTMzLWNyZWF0ZS1hLWZpbHRlci1mb3ItcHJpY2Utd2l0aC12YXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Teto](/forum/user/8045-teto "View Teto's Profile")**
- [![Teto's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar8045_2012-09-12.png)](/forum/user/8045-teto "View Teto's Profile") Topic Author
- [ Offline](/forum/user/8045-teto)

Less More

- Posts: 184
- Thank you received: 4
-
- [](http://www.madeinvino.com)
-

14 years 3 months ago -  14 years 3 months ago [\#59021](#59021) by [Teto](/forum/user/8045-teto "View Teto's Profile")  Replied by *[Teto](/forum/user/8045-teto "View Teto's Profile")* on topic *[Re: Create a filter for "Price with VAT"](/forum/4-how-to/58933-create-a-filter-for-price-with-vat#59021 "Finally I bought the Business Version of Hika!  I do not know if the behavior is intentional or a bug.  I created a radio button filter for the price. I seems hika uses the price without VAT to filter the products. is it correct?  Is it possibile to use the price with VAT in the filter? I sell almost completely in Italy and for the customers is normal to see the price with VAT included.  I have also another question. I created 2 filters: - one for the price - the second one for the category The filters select the right product if I use them separately, if I use them together there are no result. (see the attachment)  Thanks you!")*

Thank you nicolas

I enabled the debug mode.
When I select both the filters I receive an error:

500 - JDatabaseMySQL::query: 1054 - Unknown column 'p.product_id' in 'on clause' SQL=SELECT DISTINCT b.* FROM jos_hikashop_product_category AS a LEFT JOIN (SELECT * FROM jos_hikashop_product AS product1 LEFT JOIN jos_hikashop_price AS price1 ON product1.product_id=price1.price_product_id WHERE (price1.price_access = 'all' OR price1.price_access LIKE '%,2,%' OR price1.price_access LIKE '%,3,%' OR ISNULL(price1.price_access)) AND product1.product_type='main' GROUP BY product1.product_id ORDER BY price1.price_min_quantity ASC) AS b ON a.product_id=b.product_id INNER JOIN jos_hikashop_product_category AS caratteristiche1 ON caratteristiche1.product_id=p.product_id AND caratteristiche1.category_id IN (15) WHERE b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (14,15,12) AND (b.product_access = 'all' OR b.product_access LIKE '%,2,%' OR b.product_access LIKE '%,3,%') AND ( ( case when b.price_currency_id = '1' then b.price_value end ) BETWEEN 10 AND 20 ) ORDER BY b.product_sale_start ASC LIMIT 0, 20

** Update 12:30 CET *** in the meantime I added some other filters and modified the categories structure. Now I have no more problem. Honestly I don't know why but the problem is solved and the selection seems retrieve in the right way the products.

Then I copyed and tested the new filter file that you kindly sent me.
It seems to work perfectly, it selects in the right way the price with VAT included.

With the next release of Hika, will you insert this feature as standard?
If not, how can i mantain the customization?

If you need I can send you URL, username and passowrd to verify the filter error on the web site.

Last edit: 14 years 3 months ago by [Teto](/forum/user/8045-teto "View Teto's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU4OTMzLWNyZWF0ZS1hLWZpbHRlci1mb3ItcHJpY2Utd2l0aC12YXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86316
- Thank you received: 14276
-
-

14 years 3 months ago [\#59083](#59083) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Create a filter for "Price with VAT"](/forum/4-how-to/58933-create-a-filter-for-price-with-vat#59083 "Finally I bought the Business Version of Hika!  I do not know if the behavior is intentional or a bug.  I created a radio button filter for the price. I seems hika uses the price without VAT to filter the products. is it correct?  Is it possibile to use the price with VAT in the filter? I sell almost completely in Italy and for the customers is normal to see the price with VAT included.  I have also another question. I created 2 filters: - one for the price - the second one for the category The filters select the right product if I use them separately, if I use them together there are no result. (see the attachment)  Thanks you!")*

Thank you for the feedback.

We found that problem. It's actually not related to that modification but occurs because of the combination of filters that you were using. We'll add the modifications for next release as well as the fix for that error.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzU4OTMzLWNyZWF0ZS1hLWZpbHRlci1mb3ItcHJpY2Utd2l0aC12YXQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.106 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
