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

#   Price filter ignoring discount

##

- **[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")**
- [![lousyfool's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28604.jpg)](/forum/user/28604-lousyfool "View lousyfool's Profile") Topic Author
- [ Offline](/forum/user/28604-lousyfool)

Less More

- Posts: 2143
- Thank you received: 746
-
- [](http://www.inphase.one)
-

12 years 3 weeks ago [\#176999](#176999) by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")  *[Price filter ignoring discount](/forum/45-filters-search/872597-price-filter-ignoring-discount#176999 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.19 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : none  Hi,  Generally, filters work fine - with one exception so far: when filtering by price, discounts are being 'ignored', meaning that products can end up showing in the 'wrong' price bracket. In other words, it appears that only the price before discount is being considered, not the price after discount. Which IMHO is 'wrong' from the customer's perspective as presently he won't see products that are within his budget after discount.  Example: - Two filter price brackets: one $0 - $1000, the other $1000-$2000. - A product with a regular price of $1100. - A discount of 10% applied to it. Result: The discounted product, now $990, still shows in the $1000-$2000 price bracket, not in the $0-$1000 bracket where it belongs.  A fix would be appreciated - thanks!")* was created by *[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")*

-- url of the page with the problem -- : local
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.4.19
-- Browser(s) name and version -- : any
-- Error-message(debug-mod must be tuned on) -- : none

Hi,

Generally, filters work fine - with one exception so far: when filtering by price, discounts are being 'ignored', meaning that products can end up showing in the 'wrong' price bracket. In other words, it appears that only the price before discount is being considered, not the price after discount.
Which IMHO is 'wrong' from the customer's perspective as presently he won't see products that are within his budget after discount.

Example:
- Two filter price brackets: one $0 - $1000, the other $1000-$2000.
- A product with a regular price of $1100.
- A discount of 10% applied to it.
Result: The discounted product, now $990, still shows in the $1000-$2000 price bracket, not in the $0-$1000 bracket where it belongs.

A fix would be appreciated - thanks!

---

Need help with customisations of layouts, style or other site development? [ PM me!](/component/uddeim/?task=new)
(Don't forget to turn on [ "E-mail notification of new messages"](/component/uddeim/?task=settings))

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg3MjU5Ny1wcmljZS1maWx0ZXItaWdub3JpbmctZGlzY291bnQ/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: 86575
- Thank you received: 14318
-
-

12 years 3 weeks ago [\#177048](#177048) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price filter ignoring discount](/forum/45-filters-search/872597-price-filter-ignoring-discount#177048 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.19 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : none  Hi,  Generally, filters work fine - with one exception so far: when filtering by price, discounts are being 'ignored', meaning that products can end up showing in the 'wrong' price bracket. In other words, it appears that only the price before discount is being considered, not the price after discount. Which IMHO is 'wrong' from the customer's perspective as presently he won't see products that are within his budget after discount.  Example: - Two filter price brackets: one $0 - $1000, the other $1000-$2000. - A product with a regular price of $1100. - A discount of 10% applied to it. Result: The discounted product, now $990, still shows in the $1000-$2000 price bracket, not in the $0-$1000 bracket where it belongs.  A fix would be appreciated - thanks!")*

Hi,

Yes, discounts are not taken into account for prices filtering because it's not possible to calculate dynamically the discounts on the prices during the filtering in MySQL.
The only solution would be to pre calculate all the prices ahead of the filtering, with some kind of a calculation caching table.
That's a lot of work to put in place and create new problems as it requires the system to keep the prices up to date in the caching table when something changes in the prices of the products.
An easiest solution (although more work for you) is to create a custom product field where you would enter the price that you want to be used for the filtering in each product and then have your filter apply on that custom field instead of the price.

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

- **[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")**
- [![lousyfool's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28604.jpg)](/forum/user/28604-lousyfool "View lousyfool's Profile") Topic Author
- [ Offline](/forum/user/28604-lousyfool)

Less More

- Posts: 2143
- Thank you received: 746
-
- [](http://www.inphase.one)
-

12 years 3 weeks ago [\#177097](#177097) by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")  Replied by *[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")* on topic *[Price filter ignoring discount](/forum/45-filters-search/872597-price-filter-ignoring-discount#177097 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.19 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : none  Hi,  Generally, filters work fine - with one exception so far: when filtering by price, discounts are being 'ignored', meaning that products can end up showing in the 'wrong' price bracket. In other words, it appears that only the price before discount is being considered, not the price after discount. Which IMHO is 'wrong' from the customer's perspective as presently he won't see products that are within his budget after discount.  Example: - Two filter price brackets: one $0 - $1000, the other $1000-$2000. - A product with a regular price of $1100. - A discount of 10% applied to it. Result: The discounted product, now $990, still shows in the $1000-$2000 price bracket, not in the $0-$1000 bracket where it belongs.  A fix would be appreciated - thanks!")*

Aaaww, too bad, really thought it was just a thing of a bit more arithmetics... something computers are much better with than human beings.
Thanks anyway for the explanations, hope I'll be able to pass them on as well when asked...

> nicolas wrote: An easiest solution (although more work for you) is to create a custom product field where you would enter the price that you want to be used for the filtering in each product and then have your filter apply on that custom field instead of the price.

I agree that it's a valid and practical workaround for a small to mid-sized store with the occasional discount. I'm already using custom fields as cheats for other, simpler purposes, but for a market thingy with lots of products and vendors, and ever-changing discounts I feel it doesn't want to be managed manually.
I'll see how far I get without the extra math.

---

Need help with customisations of layouts, style or other site development? [ PM me!](/component/uddeim/?task=new)
(Don't forget to turn on [ "E-mail notification of new messages"](/component/uddeim/?task=settings))

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

- **[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")**
- [![BluepointWebdesign's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")
- [ Offline](/forum/user/34929-bluepointwebdesign)

Less More

- Posts: 424
- Thank you received: 11
-
-

11 years 4 weeks ago [\#218238](#218238) by [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")  Replied by *[BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")* on topic *[Price filter ignoring discount](/forum/45-filters-search/872597-price-filter-ignoring-discount#218238 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.19 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : none  Hi,  Generally, filters work fine - with one exception so far: when filtering by price, discounts are being 'ignored', meaning that products can end up showing in the 'wrong' price bracket. In other words, it appears that only the price before discount is being considered, not the price after discount. Which IMHO is 'wrong' from the customer's perspective as presently he won't see products that are within his budget after discount.  Example: - Two filter price brackets: one $0 - $1000, the other $1000-$2000. - A product with a regular price of $1100. - A discount of 10% applied to it. Result: The discounted product, now $990, still shows in the $1000-$2000 price bracket, not in the $0-$1000 bracket where it belongs.  A fix would be appreciated - thanks!")*

Hello we've the same issue,
is there allready a way how we can get the discount prices to work also with the filter?
Thanks.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 4 weeks ago [\#218241](#218241) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Price filter ignoring discount](/forum/45-filters-search/872597-price-filter-ignoring-discount#218241 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.19 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : none  Hi,  Generally, filters work fine - with one exception so far: when filtering by price, discounts are being 'ignored', meaning that products can end up showing in the 'wrong' price bracket. In other words, it appears that only the price before discount is being considered, not the price after discount. Which IMHO is 'wrong' from the customer's perspective as presently he won't see products that are within his budget after discount.  Example: - Two filter price brackets: one $0 - $1000, the other $1000-$2000. - A product with a regular price of $1100. - A discount of 10% applied to it. Result: The discounted product, now $990, still shows in the $1000-$2000 price bracket, not in the $0-$1000 bracket where it belongs.  A fix would be appreciated - thanks!")*

Hi,

The solution given by Nicolas is still the current answer for that request.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[sr9yar](/forum/user/31971-sr9yar "View sr9yar's Profile")**
- [![sr9yar's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar31971.jpg)](/forum/user/31971-sr9yar "View sr9yar's Profile")
- [ Offline](/forum/user/31971-sr9yar)

Less More

- Posts: 16
- Thank you received: 0
-
-

10 years 9 months ago [\#230016](#230016) by [sr9yar](/forum/user/31971-sr9yar "View sr9yar's Profile")  Replied by *[sr9yar](/forum/user/31971-sr9yar "View sr9yar's Profile")* on topic *[Price filter ignoring discount](/forum/45-filters-search/872597-price-filter-ignoring-discount#230016 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.19 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : none  Hi,  Generally, filters work fine - with one exception so far: when filtering by price, discounts are being 'ignored', meaning that products can end up showing in the 'wrong' price bracket. In other words, it appears that only the price before discount is being considered, not the price after discount. Which IMHO is 'wrong' from the customer's perspective as presently he won't see products that are within his budget after discount.  Example: - Two filter price brackets: one $0 - $1000, the other $1000-$2000. - A product with a regular price of $1100. - A discount of 10% applied to it. Result: The discounted product, now $990, still shows in the $1000-$2000 price bracket, not in the $0-$1000 bracket where it belongs.  A fix would be appreciated - thanks!")*

I'd like to put my two cents in.
Such behavior contradicts with seller's intention. As a seller, I'm giving discounts to attract a buyer, to make it visible to the buyer when he filters my product. For me, the more products he will find, the better. But hikashop filter, so to speak , works against me.
As a seller I don't care how many cache table my website is going to have or how mach server calculation resource I'm going to spend on pre-calculation of prices, simply because if my customer won't see this product - I won't sell it.
I for one will probably go with an additional custom field with pre-calculated price, but it would be nice to have even the simpliest workaround from hikashop team in future.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg3MjU5Ny1wcmljZS1maWx0ZXItaWdub3JpbmctZGlzY291bnQ/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: 86575
- Thank you received: 14318
-
-

10 years 9 months ago [\#230100](#230100) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Price filter ignoring discount](/forum/45-filters-search/872597-price-filter-ignoring-discount#230100 "-- url of the page with the problem -- : local -- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.4.19 -- Browser(s) name and version -- : any -- Error-message(debug-mod must be tuned on) -- : none  Hi,  Generally, filters work fine - with one exception so far: when filtering by price, discounts are being 'ignored', meaning that products can end up showing in the 'wrong' price bracket. In other words, it appears that only the price before discount is being considered, not the price after discount. Which IMHO is 'wrong' from the customer's perspective as presently he won't see products that are within his budget after discount.  Example: - Two filter price brackets: one $0 - $1000, the other $1000-$2000. - A product with a regular price of $1100. - A discount of 10% applied to it. Result: The discounted product, now $990, still shows in the $1000-$2000 price bracket, not in the $0-$1000 bracket where it belongs.  A fix would be appreciated - thanks!")*

Hi,

Please note that there is now a solution for that.
You create a custom product field and have your filter apply on it, as explained earlier in this thread, and then you create a mass action to fill that custom product field with a massaction (you can use an action 'update the values on the column name of the custom field with the value price.price_value for that).

The mass action can be run once to generate all the prices, and/or can be made to be triggered each time a price is updated so that the value in the product field stays up to date.

The following user(s) said Thank You: [BluepointWebdesign](/forum/user/34929-bluepointwebdesign "View BluepointWebdesign's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg3MjU5Ny1wcmljZS1maWx0ZXItaWdub3JpbmctZGlzY291bnQ/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.135 seconds

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