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

#   Price filter &amp; Access Level

##

- **[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")**
- [![ydingilski's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37980.png)](/forum/user/37980-ydingilski "View ydingilski's Profile") Topic Author
- [ Offline](/forum/user/37980-ydingilski)

Less More

- Posts: 52
- Thank you received: 0
-
-
-
- [](http://www.filkab.solar)
-

10 years 9 months ago [\#228773](#228773) by [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")  *[Price filter &amp; Access Level](/forum/45-filters-search/882057-price-filter-access-level#228773 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.3.15  Hi, I have two different prices for my products - one for distributors and one for all other user groups. When I have price filter with &quot;Dynamic display&quot; option on, the filter shows the lower distributor price of the cheapest product on the initial loading even when you are not logged on as distributor. If I change the maximum value of the filter it detects that the minimum price of the products is higher and fixes the scroll bar minimum value. Is there a way to fix this issue?  P.S. I haven't tested the opposite case: What would be the maximum value of the price scroll bar if you are logged on as distributor, i.e. the most expensive product will have lower distributor price and higher end user price. Which price would the filter detect on the initial loading?")* was created by *[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")*

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8
-- PHP version -- : 5.3.15

Hi,
I have two different prices for my products - one for distributors and one for all other user groups.
When I have price filter with "Dynamic display" option on, the filter shows the lower distributor price of the cheapest product on the initial loading even when you are not logged on as distributor. If I change the maximum value of the filter it detects that the minimum price of the products is higher and fixes the scroll bar minimum value.
Is there a way to fix this issue?

P.S. I haven't tested the opposite case: What would be the maximum value of the price scroll bar if you are logged on as distributor, i.e. the most expensive product will have lower distributor price and higher end user price. Which price would the filter detect on the initial loading?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg4MjA1Ny1wcmljZS1maWx0ZXItYWNjZXNzLWxldmVsP3RtcGw9bWFya2Rvd24=) 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: 86576
- Thank you received: 14320
-
-

10 years 9 months ago -  10 years 9 months ago [\#228775](#228775) 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 &amp; Access Level](/forum/45-filters-search/882057-price-filter-access-level#228775 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.3.15  Hi, I have two different prices for my products - one for distributors and one for all other user groups. When I have price filter with &quot;Dynamic display&quot; option on, the filter shows the lower distributor price of the cheapest product on the initial loading even when you are not logged on as distributor. If I change the maximum value of the filter it detects that the minimum price of the products is higher and fixes the scroll bar minimum value. Is there a way to fix this issue?  P.S. I haven't tested the opposite case: What would be the maximum value of the price scroll bar if you are logged on as distributor, i.e. the most expensive product will have lower distributor price and higher end user price. Which price would the filter detect on the initial loading?")*

Hi,

Try to change the code: Code:

$copy_query=str_replace('WHERE','LEFT JOIN '.hikashop_table('price').' AS pprice ON '.$product_table.'.product_id=pprice.price_product_id WHERE',$copy_query);

to: Code:

$replace = 'LEFT JOIN '.hikashop_table('price').' AS pprice ON '.$product_table.'.product_id=pprice.price_product_id WHERE'; $conditions = array(); hikashop_addACLFilters($conditions, 'price_access', 'pprice'); if(count($conditions)) $replace .= ' '.$conditions[0].' AND'; $copy_query=str_replace('WHERE',$replace,$copy_query);

in the file administrator/components/com_hikashop/classes/filter.php
That should hopefully fix the issue.

Last edit: 10 years 9 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile"). Reason: fixed code

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

- **[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")**
- [![ydingilski's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37980.png)](/forum/user/37980-ydingilski "View ydingilski's Profile") Topic Author
- [ Offline](/forum/user/37980-ydingilski)

Less More

- Posts: 52
- Thank you received: 0
-
-
-
- [](http://www.filkab.solar)
-

10 years 9 months ago [\#228887](#228887) by [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")  Replied by *[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")* on topic *[Price filter &amp; Access Level](/forum/45-filters-search/882057-price-filter-access-level#228887 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.3.15  Hi, I have two different prices for my products - one for distributors and one for all other user groups. When I have price filter with &quot;Dynamic display&quot; option on, the filter shows the lower distributor price of the cheapest product on the initial loading even when you are not logged on as distributor. If I change the maximum value of the filter it detects that the minimum price of the products is higher and fixes the scroll bar minimum value. Is there a way to fix this issue?  P.S. I haven't tested the opposite case: What would be the maximum value of the price scroll bar if you are logged on as distributor, i.e. the most expensive product will have lower distributor price and higher end user price. Which price would the filter detect on the initial loading?")*

Prompts an error - I think it was 1064.
Maybe there is a problem in the statement.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg4MjA1Ny1wcmljZS1maWx0ZXItYWNjZXNzLWxldmVsP3RtcGw9bWFya2Rvd24=) 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: 86576
- Thank you received: 14320
-
-

10 years 9 months ago [\#228892](#228892) 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 &amp; Access Level](/forum/45-filters-search/882057-price-filter-access-level#228892 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.3.15  Hi, I have two different prices for my products - one for distributors and one for all other user groups. When I have price filter with &quot;Dynamic display&quot; option on, the filter shows the lower distributor price of the cheapest product on the initial loading even when you are not logged on as distributor. If I change the maximum value of the filter it detects that the minimum price of the products is higher and fixes the scroll bar minimum value. Is there a way to fix this issue?  P.S. I haven't tested the opposite case: What would be the maximum value of the price scroll bar if you are logged on as distributor, i.e. the most expensive product will have lower distributor price and higher end user price. Which price would the filter detect on the initial loading?")*

Hi,

What is the exact error message you get ?

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

- **[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")**
- [![ydingilski's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37980.png)](/forum/user/37980-ydingilski "View ydingilski's Profile") Topic Author
- [ Offline](/forum/user/37980-ydingilski)

Less More

- Posts: 52
- Thank you received: 0
-
-
-
- [](http://www.filkab.solar)
-

10 years 9 months ago [\#228975](#228975) by [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")  Replied by *[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")* on topic *[Price filter &amp; Access Level](/forum/45-filters-search/882057-price-filter-access-level#228975 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.3.15  Hi, I have two different prices for my products - one for distributors and one for all other user groups. When I have price filter with &quot;Dynamic display&quot; option on, the filter shows the lower distributor price of the cheapest product on the initial loading even when you are not logged on as distributor. If I change the maximum value of the filter it detects that the minimum price of the products is higher and fixes the scroll bar minimum value. Is there a way to fix this issue?  P.S. I haven't tested the opposite case: What would be the maximum value of the price scroll bar if you are logged on as distributor, i.e. the most expensive product will have lower distributor price and higher end user price. Which price would the filter detect on the initial loading?")*

1064
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERELEFT JOIN fx904_hikashop_price AS pprice ON b.product_id=pprice.price_produ' at line 1 SQL=SELECT DISTINCT b.product_id FROM fx904_hikashop_product_category AS a LEFT JOIN fx904_hikashop_product AS b ON a.product_id=b.product_id LEFT JOIN fx904_hikashop_price AS pprice ON b.product_id=pprice.price_product_id WHERELEFT JOIN fx904_hikashop_price AS pprice ON b.product_id=pprice.price_product_id WHERE (pprice.price_access = 'all' OR pprice.price_access LIKE '%,1,%') AND b.product_published=1 AND b.product_type = 'main' AND a.category_id IN (20) AND (b.product_access = 'all' OR b.product_access LIKE '%,1,%') ORDER BY b.product_custom_ordering ASC

- [ ![1064.png](/forum/attachment/29359) ](/forum/attachment/29359 "1064.png") [ ](/forum/attachment/29359?download=1 "1064.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQ1LWZpbHRlcnMtc2VhcmNoLzg4MjA1Ny1wcmljZS1maWx0ZXItYWNjZXNzLWxldmVsP3RtcGw9bWFya2Rvd24=) 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: 86576
- Thank you received: 14320
-
-

10 years 9 months ago [\#228997](#228997) 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 &amp; Access Level](/forum/45-filters-search/882057-price-filter-access-level#228997 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.3.15  Hi, I have two different prices for my products - one for distributors and one for all other user groups. When I have price filter with &quot;Dynamic display&quot; option on, the filter shows the lower distributor price of the cheapest product on the initial loading even when you are not logged on as distributor. If I change the maximum value of the filter it detects that the minimum price of the products is higher and fixes the scroll bar minimum value. Is there a way to fix this issue?  P.S. I haven't tested the opposite case: What would be the maximum value of the price scroll bar if you are logged on as distributor, i.e. the most expensive product will have lower distributor price and higher end user price. Which price would the filter detect on the initial loading?")*

Hi,

Thank you.

I had made a mistake in the code I had given. I've fixed the code in my previous message. You shouldn't have that error anymore if you update the code with the new version of it in my previous message.

The following user(s) said Thank You: [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")

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

- **[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")**
- [![ydingilski's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar37980.png)](/forum/user/37980-ydingilski "View ydingilski's Profile") Topic Author
- [ Offline](/forum/user/37980-ydingilski)

Less More

- Posts: 52
- Thank you received: 0
-
-
-
- [](http://www.filkab.solar)
-

10 years 9 months ago -  10 years 3 months ago [\#229159](#229159) by [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")  Replied by *[ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile")* on topic *[Price filter &amp; Access Level](/forum/45-filters-search/882057-price-filter-access-level#229159 "-- HikaShop version -- : 2.6.1 -- Joomla version -- : 3.4.8 -- PHP version -- : 5.3.15  Hi, I have two different prices for my products - one for distributors and one for all other user groups. When I have price filter with &quot;Dynamic display&quot; option on, the filter shows the lower distributor price of the cheapest product on the initial loading even when you are not logged on as distributor. If I change the maximum value of the filter it detects that the minimum price of the products is higher and fixes the scroll bar minimum value. Is there a way to fix this issue?  P.S. I haven't tested the opposite case: What would be the maximum value of the price scroll bar if you are logged on as distributor, i.e. the most expensive product will have lower distributor price and higher end user price. Which price would the filter detect on the initial loading?")*

Hi nicolas,
Now it's working fine, Thank you.

Last edit: 10 years 3 months ago by [ydingilski](/forum/user/37980-ydingilski "View ydingilski's Profile").

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

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