Filtering isn't working correctly with Infinite scroll option

  • Posts: 410
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
2 years 4 months ago #343404

-- url of the page with the problem -- : again.nu/dames/tops
-- HikaShop version -- : 4.6.0
-- Joomla version -- : 3.10.10

Hi,

when I go to again.nu/dames/tops and filter on Maat (size) "S", then filter Kleur (color) "Blauw" (Blue)... then I see nicely the right products... BUT, when scrolling down I get different colors?!
When I refresh the page the filtering is like it should and only showing size S and color blue.

In the menu settings we have the "Infinite scroll" options turned on. When we turn that OFF, the filtering works like is should. I hope you can help me with this...

regards,
Michiel

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 4 months ago #343416

Hello,

Thanks for your return, in order to be able to get the root issue, but we are unable to reproduce your issue on your side, and so can you provide these elements please :
- Your relative filter entries settings screenshot
- Process a test with a default template (like ProtoStar) in order to see if that change something to your issue, and make your detailed returns.

Awaiting your returns to progress on your issue
Regards

Last edit: 2 years 4 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 410
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
2 years 4 months ago #343428

Hello Phillip,

In all honesty.... I didn't immediately had the "problem" on my computer today either.
I then went to look at another computer here at the office and there I had the problem. Then I went to look at Lambdatest.com (don't know if you know that) and there I also had the same problem on Mac and Windows with different browsers.

Then I cleared the browser cache and cleared the cache in the backend of Joomla. And then there was the problem again...when filtering on a color, scrolling down the page other colors where showing.

In the attachments the step 1 to 4 where you see that there are other colors the blue are showing.
This only happens when we use the option "Infinite scroll" in the menu item.

This message contains confidential information

Awaiting your reply.

Regards,
Michiel

Attachments:
Last edit: 2 years 4 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 4 months ago #343434

Hello,

Please, process the previously requested test with a default protoStar, and whatever the result, please give your feedback.
Thanks to stick point per point to our indications.

Regards

Please Log in or Create an account to join the conversation.

  • Posts: 410
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
2 years 3 months ago #343497

Hello,

I did a test with the Protostar template and via Lambatest I got blue items while I had filtered on brown.

The weird thing is that I tested it on my own computer first in Firefox and Chrome... and there I didn't have any weird stuff after filtering. Then I tried it via Lambatest in Safari (was good), in chrome (was good) and then in Edge where other colors were shown than what was filtered on. So it is not a 'fixed' fact that the filtering always goes wrong... and that makes it so difficult to determine what the cause is. Of course also for you ;)

I would like to hear if you have any other ideas what could be causing this.

Regards,
Michiel

Please Log in or Create an account to join the conversation.

  • Posts: 410
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
2 years 3 months ago #343499

Hi there again... We have found a page where it goes wrong the hole time: again.nu/heren/truien-vesten
When you filter on size S then you get all different sizes... see attachment.
When you refresh the page you only get the 2 products size S.

Regards,
Michiel

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
2 years 3 months ago #343501

Hello,

Well the issue getting more strange, we follow your last Url link (again.nu/heren/truien-vesten), and weren't able to succeed to reproduce your described issue.
From this 2 possibilities :
- You have solved the issue by yourself
OR
- Your issue directly come from your navigator, and more especially some cache settings ?

Just a guess but as we weren't able to reproduce the issue (with several navigator Chrome, Opera & Edge).
Hope this will help you to get the root issue.
Regards

Last edit: 1 year 8 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 4
1 year 8 months ago #349751

I'm actually getting this same issue now appearing on my site also, but I can't tell from this thread if there was any definitive cause.

If you visit ( sewingmachinesuk.co.uk/domestic-machine-listings ) and apply a descending price filter it will order the top options but then infinite scroll will reveal a random assortment of products.

If you then refresh the page with the filtered url ( sewingmachinesuk.co.uk/domestic-machine-...er_InStock_4_values= ) you will get a page of results that works as intended, even with infinite scroll. Very strange.

I've not been able to find a solution for this myself and this thread doesn't seem to contain one. Was it ever discovered by any users in the thread?

(I also tried this on multiple browsers and managed to replicate the error)

Last edit: 1 year 8 months ago by jasmine247. Reason: Add extra information

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
1 year 8 months ago #349752

Hello,

Did you process previous tests with a default template (ProtoStar J3 & Cassiopeia J4) ?
And can you provide these informations Joomla & HikaShop version ?

Awaiting your returns
Regards

Last edit: 1 year 8 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 121
  • Thank you received: 10
  • Hikashop Business
1 year 8 months ago #349777

I have the same problem as you but only on certain categories on my website. Some are working very well and for others, I have to refresh the page to "activate" the filter properly and I have to refresh the page to clear the field if I clicked on the "reinitialize" filter button...

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
1 year 8 months ago #349796

Hello,

Then can you provide previously requested elements please ( here )?
Regards

Last edit: 1 year 8 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 4
1 year 8 months ago #349804

I have just done the tests on my XAMPP test site and you're right, it does seem to work on the protostar template, however the site is built around my current template.

I'm on Joomla 3.10 and Hikashop 4.7.1 (I'm in the process of migrating to Joomla 4)

Please Log in or Create an account to join the conversation.

  • Posts: 121
  • Thank you received: 10
  • Hikashop Business
1 year 8 months ago #349805

Hi Philip!

I didn't run a test with a default template as the filters work perfectly on some categories.

My website: www.grimages.com
Categories where it works: Paillettes, éponges, pochoirs, accessoires
Categories where you have to refresh the page: all the others ;)

Joomla version 4.2.8
Hikashop version 4.7.1

Thanks for your help ;)

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 8 months ago #349834

Hi,

@jasmine247
I don't think your problem has anything to do with the infinite scroll option.
When you use the sorting by price, HikaShop uses the product_sort_price value of the products to sort the products. This value in the hikashop_product table in the database is automatically refreshed when you save a product in the backend.
What's likely is that some of the products on your website have a wrong value in that product_sort_price column for some reason ( for example, due to the way the prices are being inserted or have being added in the past).
So what you'll need to do, is to update the sort prices of your products with the current price of the products.
For example, you could go in each product, one by one and save them once. That should fix the problem.
Another solution would be to use a mass action with an action "update the values" on the product_sort_price column in the "operation" mode with the value price.price_value
This will automatically fill the product_sort_price with the price of the product.

@info@lerenardquitrace.be
You've already opened a thread for your issue here ( www.hikashop.com/forum/5-support-en-fran...n-vers-joomla-4.html ). Also, your problem is not the same as the issue mentioned initially in this thread, nor the same as what @jasmine247 is describing. Please don't post here and continue discussing your problem on the other thread. Thanks.

Last edit: 1 year 8 months ago by nicolas.
The following user(s) said Thank You: info@lerenardquitrace.be

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 4
1 year 8 months ago #349992

Thank you very much Nicolas, I'll try that now.

Sorry for the delayed reply.

I'll post back with the results.

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 4
1 year 8 months ago #350000

Hey again Nicolas!

I've tried that mass action, however it has not solved the problem.
I checked the values to double check it had worked and they all align with the price values, so it must have.

I think the issue may be more wide spread than I realized, as I'm seeing it not only affecting the price filters.
E.g on this page when you filter by any colour and then try to use the infinite scroll it will populate with random colours after the initially filtered products.
sewingmachinesuk.co.uk/thread-shop

Appears to be the interaction of infinite scroll on any of my filters.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 8 months ago #350001

Hi,

Can you try replacing the code:

$value = hikaInput::get()->getVar($name);
by:
				$value = hikaInput::get()->getVar($name, null);
				if(is_null($value) || (is_string($value) && !strlen($value))) {
					$cid = hikaInput::get()->getInt("cid",'itemid_'.hikaInput::get()->getInt("Itemid",0));
					$value = $app->getUserState('com_hikashop.'.$cid.'_filter_'.$uniqueFitler->filter_namekey, '');
				}
in the file components/com_hikashop/views/product/tmpl/listing_div.php and it should help.
If not, we'll need a FTP access in order to look into it.

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 4
1 year 8 months ago #350072

Hey Nicolas,

Unfortunately no luck! Same issue still persists.

That code initially kicked up an error 0 Call to a member function getUserState () IS NULL, I managed to fix that by adding the line:
$app = JFactory::getApplication();

But still no luck. Same infinite scroll filter issue as before.

I've tried clearing cache/disabling completely. Tried with the default template.

Not entirely sure why it is working on my XAMPP when that's an Akeeba snapshot of my live site.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 8 months ago #350073

Hi,

Then, we'll need a FTP access in order to look into it.

Could you provide that ?

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 4
1 year 8 months ago #350090

I can, what is the most secure way of getting this to you?

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum