No ajax filtering

  • Posts: 200
  • Thank you received: 75
5 years 3 months ago #309894

Hi,

thanks for the replies.
We'll test to see if POST redirect mode turned off won't have any other side effects, because in the past it was quite important to have it switched on to prevent frequent "resubmit" warning messages in a lot of places when users go back a page.

Also, with POST redirect mode off the browser does indeed remember the filters, but perhaps a bit too well. Because the browser won't just remember the filter setting when going back one page to the listing, but will keep remembering the filter settings of each and every product listing page a user has visited. So even when a user has visited many other pages and returns to a specific listing after a few hours, the filters will still be applied for that particular listing, which the user will likely have forgotten all about and he may not realise he's not seeing all products.

But we can try to make some design changes to make this more clear to users, and we'll keep testing.
Thanks again.

Kind regards,

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

  • Posts: 158
  • Thank you received: 5
5 years 3 months ago #310066

I'm having issues with the new ajax filtering too - they were working OK until I updated to 4.2.1. I tried to find the ajax_filter setting in my database but it's not there?

I'll create a new thread with my issues but I'd like to get it working again this way as it's causing a lot of issues with my users.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 3 months ago #310072

Hi,

I've replied to you on that other thread:
www.hikashop.com/forum/filters-search/89...to-4-2-1.html#310071

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

  • Posts: 1119
  • Thank you received: 114
5 years 2 months ago #311183

Hi,

It seems there is a small bug with filters. We have used fresh Joomla and Hikashop install.

Having only one filtering "Sort" on product listing will throw js error in console each time you try to sort and the filtering still works tho...If you have more filters on page seems no errors occures.






Hope you can reproduced the issue.

Thanks

Attachments:

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

  • Posts: 1119
  • Thank you received: 114
5 years 2 months ago #311184

Update.

I was a bit fast. The error wont show only if you have price filter ( type cursor ) else each time you filter with any filtering you have it will throw that error.

Thanks

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 1 month ago #311206

Hi,

Thank you for your report.
Add the line:
if(!window.localPage) window.localPage = {};
before the line:
window.localPage.infiniteScrollPage = 1;
in the file media/com_hikashop/js/hikashop.js and that will fix that error.
We'll add that fix on our end too.

The following user(s) said Thank You: kyratn

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

  • Posts: 1119
  • Thank you received: 114
5 years 1 month ago #311469

Hi,

It seems there is unwanted behavior with new ajax filtering. I will try to explain as clear as possible.

The issue.

As example i do have filter "Size" with 3 values S, M, L checkboxes....

Step 1. Select M, product list is updated with ajax.
Step 2. Go to next page via pagination, page 2.... (URL: ....?limitstart=24&filter_Size_10=4&filter=1)
Step 3. Deselect M, product list is updated with ajax. page 1 now (URL is the same: ....?limitstart=24&filter_Size_10=4&filter=1)
Step 4. Refresh page, value M selected, page 2 (URL: ....?limitstart=24&filter_Size_10=4&filter=1)

This is wrong, why it is selected if i already removed it?

Now, if after step 3 i go to next page (page 2) the url becomes like this "...?limitstart=24&filter_Size_10=+&filter=1&filter=1"

Again 2 issues here:

1. If i press browser back, i am again on "step 4" with value M selected....

Why would it show me my previous selection if i removed it and tried to go to next page without any filters but changed my mind and went back. I would like to see page 1 without any selections.

2. While doing this i have added "&filter=1" for like 15 times, which makes url very long, especially if you have a lot of filters on page.... How to do it? Select value, unselect value, go to next page and each time goin to next page "&filter=1" will be added to the end of the url.


As far as i can see the biggest issue here is that filter url values are not updated after ajax refresh.

Thanks

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

  • Posts: 1119
  • Thank you received: 114
5 years 1 month ago #311470

A bit update on this.

We have turned on Redirect post mode and uncommented some code in hikashop.js file as per this topic:

www.hikashop.com/forum/filters-search/89...ther-bug.html#310909

Seems everything works perfect for us as far as i can see. So i would like to highly suggest to take a look into filters again and use that piece of code with next Hikashop release :)

Thanks

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 1 month ago #311480

Hi,

Thank you for your feedback on this.
Next question I have is do you have any issue with that code being uncommented when you have the redirect POST mode deactivated ?

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

  • Posts: 1119
  • Thank you received: 114
5 years 1 month ago #311481

Hi,

I played with it a lot and honestly i didn't find any issues. But we use only 3 types of filters. Checkbox, radio and singledropdown. I also tried with "price cursor" and "list" just for testing and had no issues at all...

What i see that it wont save filters per page as it would previously. But i think it is really good behavior as those filter saves per page could confuse people. Redirect post mode option has no effect on it anymore...

Browser history back or page refresh works fine. No issues...

The only issue i found is related to your code provided in this topic: www.hikashop.com/forum/feature-request/8...-filters.html#311217

And inside

while($count<$this->maxFilter+1){

i am trying to add active class like this:
if(!empty($filters[$count]->filterActive)){
			   $activeClass = 'active';
			}else{
			   $activeClass = '';		
			}

With redirect mode disabled it acts weird.

As example. I select deselect value M and then go to same product listing page via menu, the "active" class could be added to all filters or sometimes randomly to some of them. Not sure why it does like that. Maybe my code is wrong but as it was working fine with redirect post mode on, i didn't look into it anymore.

Hope that helps.

Thank you

The following user(s) said Thank You: nicolas

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

  • Posts: 1119
  • Thank you received: 114
5 years 1 week ago #313023

Hi,

I may be wrong but it seems that the filter reset button doesn't work per each filter module as it was before...

The issue:

Having 2 different modules A and B on page in different template location.

While clicking reset button in module A, it will reset filters in module A and B. Basically any reset button will reset all filters on page.

Can you reproduce the issue?


Tried with protosar template and turned off redirect post mode, same issue...


Thanks

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

  • Posts: 1119
  • Thank you received: 114
5 years 1 week ago #313111

Bump. Anyone?

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

  • Posts: 1119
  • Thank you received: 114
5 years 4 days ago #313227

Bump x2

Is there any reason i am not getting replay here?

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

  • Posts: 200
  • Thank you received: 75
5 years 3 days ago #313280

@kyratn
We do get notifications from this thread, so not sure why it is getting overlooked by the hikashop team, perhaps they're very busy.

We haven't looked at ajax filtering that much since we're still sticking with the "old" way of filtering without ajax, so we don't have an identical situation to yours. However, what I can say is that as far as we can remember, the filter reset button has always worked that way and always resets all filters on a page.

If you look for example at com_hikashop/components/views/product/view.html.php at line 1073:

if(hikaInput::get()->getVar('reseted')==1){
	$_POST['filter_'.$uniqueFitler->filter_namekey] = '';
}
You can see that when anything is "reseted" on a page, every filter will be set to empty, it doesn't check or discern which module a filter is in. This could certainly be a useful feature in some situations, but as far as we remember, hikashop has never worked like that.

In any case, hopefully our message might help to get through to the hikashop team and they can help you further.

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

  • Posts: 1119
  • Thank you received: 114
5 years 3 days ago #313282

Hi,

@GW

Thanks for your message.

I see that this topic is assigned to Nicolas. Not sure why no replay for like 1 week...

Anyway. You may be right. I don't remember how it was working without ajax.

However, while looking for best solution to use "product search", i tried to add simple search filter in different template location and find this unwanted behaviour. The idea was to use hikashop filters on product listings and add additional search input as different module. While using "search" it would redirect to menu item with all products + you could even filter it more with hikashop filters... That menu item would be not accessible without search params... I couldn't accomplish my development due after filter reset, search params would be lost too... Long story tho...


Maybe this could be added as improvements... I am gonna wait for a replay for next few days and will create new topic if need it.

Thanks

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

Time to create page: 0.110 seconds
Powered by Kunena Forum