- Posts: 280
- Thank you received: 42
Dynamic filter shpw all the options when no product is found.
5 years 7 months ago - 5 years 7 months ago #330001
by oxido
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.3.27
Hi,
All the filters from my page are set to "Dynamic display: ON".
I have a filter that show a list of checkbox's with Authors and is working well until I use another filter and that filter doesnt applay to any product, so the result it is: No products found.
But also, the filter that shows the Author's, it will show all of them, is this how it should work?
I'm expecting that the filter to not show any of the authors.
And the same thinck is happening with all the filters that are set to Dynamic Display
-- Joomla version -- : 3.9.24
-- PHP version -- : 7.3.27
Hi,
All the filters from my page are set to "Dynamic display: ON".
I have a filter that show a list of checkbox's with Authors and is working well until I use another filter and that filter doesnt applay to any product, so the result it is: No products found.
But also, the filter that shows the Author's, it will show all of them, is this how it should work?
I'm expecting that the filter to not show any of the authors.
And the same thinck is happening with all the filters that are set to Dynamic Display
Last edit: 5 years 7 months ago by oxido.
Please Log in or Create an account to join the conversation.
5 years 7 months ago - 5 years 7 months ago #330007
by Philip
Replied by Philip on topic Dynamic filter shpw all the options when no product is found.
Hello,
in order to better understand the situation can you provide these elements :
- An Url link to the issue.
- A step by step process in order to reproduce your issue
- your relative filter settings screenshot
Awaiting your returns to be able to progress on your subject.
regards
in order to better understand the situation can you provide these elements :
- An Url link to the issue.
- A step by step process in order to reproduce your issue
- your relative filter settings screenshot
Awaiting your returns to be able to progress on your subject.
regards
Last edit: 5 years 7 months ago by Philip.
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330024
by oxido
Replied by oxido on topic Dynamic filter shpw all the options when no product is found.
-
- From the first filter select the last checkbox (500,00 lei and above), that is the price.
There is no product with the price of 500 or above, so theresult it will be "No products found".
In the second filter "Autori", witch it means "Authors" you will see the entire list, but in back-end, only 2 Authors are set for 2 or 3 products.
Thank you.
This message contains confidential information
- From the first filter select the last checkbox (500,00 lei and above), that is the price.
There is no product with the price of 500 or above, so theresult it will be "No products found".
In the second filter "Autori", witch it means "Authors" you will see the entire list, but in back-end, only 2 Authors are set for 2 or 3 products.
Thank you.
Please Log in or Create an account to join the conversation.
5 years 7 months ago - 5 years 7 months ago #330035
by nicolas
Replied by nicolas on topic Dynamic filter shpw all the options when no product is found.
Hi,
I've made a patch for that. Please download the filter.zip file attached and replace the file administrator/components/com_hikashop/classes/filter.php by the file in the zip and it should hopefully change that behavior to work like you want.
Please report the result of the test so that we can add that for the next version of HikaShop on our end.
I've made a patch for that. Please download the filter.zip file attached and replace the file administrator/components/com_hikashop/classes/filter.php by the file in the zip and it should hopefully change that behavior to work like you want.
Please report the result of the test so that we can add that for the next version of HikaShop on our end.
Last edit: 5 years 7 months ago by nicolas.
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330057
by oxido
Replied by oxido on topic Dynamic filter shpw all the options when no product is found.
The filter behaves the same.
I made sure I put the file where it should be, cleared the cache and tried several times.
I made sure I put the file where it should be, cleared the cache and tried several times.
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330059
by nicolas
Replied by nicolas on topic Dynamic filter shpw all the options when no product is found.
Hi,
Then I would need to do some debugging on your website to check on the situation and better understand what's going on.
Could you provide a FTP access via our contact form along with a link to this thread for reference ?
www.hikashop.com/support/contact-us.html
Then I would need to do some debugging on your website to check on the situation and better understand what's going on.
Could you provide a FTP access via our contact form along with a link to this thread for reference ?
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330102
by nicolas
Replied by nicolas on topic Dynamic filter shpw all the options when no product is found.
Hi,
I got your backend access but I have a hard time adding debug code to the filter system. It seems that there is some caching system which messes with my tests and I'm not sure how your filters are configured.
Could you provide a backend access in the same manner so that I could check your backend settings too ?
I got your backend access but I have a hard time adding debug code to the filter system. It seems that there is some caching system which messes with my tests and I'm not sure how your filters are configured.
Could you provide a backend access in the same manner so that I could check your backend settings too ?
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330108
by oxido
Replied by oxido on topic Dynamic filter shpw all the options when no product is found.
I have create a new menu '
This new menu use a normal template, the problem with the caching it's because of the template I use, gantry 5
The account is Administrator with access to Hikashop.
This message contains confidential information
"This new menu use a normal template, the problem with the caching it's because of the template I use, gantry 5
This message contains confidential information
The account is Administrator with access to Hikashop.
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330140
by oxido
Replied by oxido on topic Dynamic filter shpw all the options when no product is found.
You can also find jdump and jump for hikashop installed in plugins
Please Log in or Create an account to join the conversation.
5 years 7 months ago #330210
by nicolas
Replied by nicolas on topic Dynamic filter shpw all the options when no product is found.
Hi,
Thanks for the access.
The patch I had made was almost working.
I had to change :
to:
and then it now seems to be working fine.
We'll add the modifications on our end for the next version of HikaShop.
Note that you still have caching on your website. However, it's apparently not a page cache, but a PHP file cache I think. So it's something at the server level like opcache. So I had to wait a few minutes between each modification to the file to see the change on the page.
Thanks for the access.
The patch I had made was almost working.
I had to change :
Code:
if(!empty($datas['products']) && (empty($values) || !in_array($temp[0],$values))) {
Code:
if(isset($datas['products']) && (empty($values) || !in_array($temp[0],$values))) {
We'll add the modifications on our end for the next version of HikaShop.
Note that you still have caching on your website. However, it's apparently not a page cache, but a PHP file cache I think. So it's something at the server level like opcache. So I had to wait a few minutes between each modification to the file to see the change on the page.
The following user(s) said Thank You: oxido
Please Log in or Create an account to join the conversation.
Time to create page: 0.254 seconds