You have no items in your shopping cart.

Wednesday, December 11, 2019 1:48:54 AM

Bugs

Avatar

Posted: 5 years ago

#206 Quote

Support

Posted: 5 years ago

#206 Quote
Topic for reporting any NopSpeedFilters plugin problems and Bugs.

IMPORTANT NOTE: There is a known issues with installing new plugins in nopCommerce.
Please read this post for more information.
Avatar

Posted: 2 years ago

#6701 Quote

rrogne

Posted: 2 years ago

#6701 Quote
Hi I am using your speed filters. But there is some suspicious behaviour on the search page.
When i search for a string for example. "apple" i have a result with 749 products. I have several filters for my products, and when choose one of them i retreive the error message that i need to add 3 characters in the search.
When i inspect the network tab i trigger a call to FNSearch and passing following parameters:

Form Data
page_id: 0
fitlerstring: sFilters=63!170
urlparam: #/sFilters=63!170

How come i get this error message? The filters working perfectly on the category pages.
Avatar

Posted: 2 years ago

#6702 Quote

rrogne

Posted: 2 years ago

#6702 Quote
I could alos add the response from the call in network tab.
{"success":false,"message":"Add 3 characters"}
Avatar

Posted: 2 years ago

#6704 Quote

Support

Posted: 2 years ago

#6704 Quote
NopCommerce has internal setting for minimum search value. Plugin uses this value.
Avatar

Posted: 2 years ago

#6707 Quote

rrogne

Posted: 2 years ago

#6707 Quote
Yes i am well aware about that, but i have already search for "Apple", and it's like i'am trigger a new serch when i choose a filter but without my previous search word.
Avatar

Posted: 2 years ago

#6709 Quote

Support

Posted: 2 years ago

#6709 Quote
What nopCommerce version do you use?
I'll check it.
Avatar

Posted: 2 years ago

#6710 Quote

rrogne

Posted: 2 years ago

#6710 Quote
I am using version 3.9.
Avatar

Posted: 2 years ago

#6711 Quote

rrogne

Posted: 2 years ago

#6711 Quote
This is what i get from your debug file.
2017.10.17 14:26:10:0856*******
SpeedFiltersController. FNSSearch. page_id=0, filterstring=sFilters=63!180,173, urlparam=#/sFilters=63!180,173
2017.10.17 14:26:10:1006*******
SelectedSpeedFilter. GetSelectedSpecFilters. name=sFilters, filerstring=sFilters=63!180,173
                 selectedlist=63!180,173
                 strGroupId=63!180,173
                          blockId=63, id=180
                          blockId=63, id=173


2017.10.17 14:26:10:1176*******
SelectedSpeedFilter. GetSelectedSpecFilters. name=aFilters, filerstring=sFilters=63!180,173
                 selectedlist=
Avatar

Posted: 2 years ago

#6713 Quote

Support

Posted: 2 years ago

#6713 Quote
>I am using version 3.9.
I can't duplicate this problem....


I opened 'Search page' and wrote 'apple', I saw two products and selected filters... I saw the same two products...
I checked the log and I saw the word 'apple' in plugin log file, in browser log too...

Can you  check if your Search page has any new JavaScript? (ex. for tracking code...) maybe another script 'cuts' the word 'Apple'....

or another idea. Maybe you changed the input block name (default name q)?
Avatar

Posted: 2 years ago

#6714 Quote

rrogne

Posted: 2 years ago

#6714 Quote
No i havent changed it's default name. Please see for youre self. http://familywalls.com.motillo.se/en/search?q=apple
Avatar

Posted: 2 years ago

#6715 Quote

Support

Posted: 2 years ago

#6715 Quote
You didn't have input field 'q' for search string 'Apple'.
You have only small search input filed 'small-searchterms'.


Avatar

Posted: 2 years ago

#6716 Quote

rrogne

Posted: 2 years ago

#6716 Quote
I don't get it? I have an inputfield small-search terms with name="q". What should i change?
Avatar

Posted: 2 years ago

#6717 Quote

rrogne

Posted: 2 years ago

#6717 Quote
When i am debugging your code i see you're getting the query string from this section
var fns_searchepageinputvalue = $(".search-input").find("#q").val();

So when i am debugging and sets value to "apple" i get a new errror. I assume i could tweak that snippet and also look for my small search terms.
But the new error gives me the response
{"success":false,"message":"Error. Failed to load products. Please refresh the page and try one more time."}
Avatar

Posted: 2 years ago

#6718 Quote

Support

Posted: 2 years ago

#6718 Quote
>var fns_searchepageinputvalue = $(".search-input").find("#q").val();
Write me your new code.

I am sure that you use wrong JQuery code.
Avatar

Posted: 2 years ago

#6720 Quote

rrogne

Posted: 2 years ago

#6720 Quote
That code gets correct query string.
$('#search-value').val()
Avatar

Posted: 2 years ago

#6722 Quote

Support

Posted: 2 years ago

#6722 Quote
You didn't change the code.

Try to find this code and change it using your HTML id values.

[code]
//searchpage
    if ($(".basic-search") != undefined && $(".advanced-search") != undefined) {
        var fns_searchepageinputvalue = $(".search-input").find("#q").val();
        if (fns_searchepageinputvalue == undefined)
            fns_searchepageinputvalue = $(".search-input").find("#Q").val();
        if (fns_searchepageinputvalue != undefined && fns_searchepageinputvalue.trim().length > 0) {
            fns_searchepageinputvalue = fns_searchepageinputvalue.trim();
            speed_filter_urlparam = sf_addparameterblock(speed_filter_urlparam, "q=" + fns_searchepageinputvalue, "&");
            speed_filter_filterstring = sf_addparameterblock(speed_filter_filterstring, "q=" + fns_searchepageinputvalue, "&");
        }
        if ($(".search-input").find("#adv").attr("checked") == 'checked') {
            if ($(".search-input").find("#adv").attr("checked") == 'checked' ||
                $(".search-input").find("#As").attr("checked") == 'checked') {
                speed_filter_urlparam = sf_addparameterblock(speed_filter_urlparam, "adv=true", "&");
                speed_filter_filterstring = sf_addparameterblock(speed_filter_filterstring, "adv=true", "&");
            }
            if ($(".search-input").find("#isc").attr("checked") == 'checked' ||
                $(".search-input").find("#Isc").attr("checked") == 'checked') {
                speed_filter_urlparam = sf_addparameterblock(speed_filter_urlparam, "isc=true", "&");
                speed_filter_filterstring = sf_addparameterblock(speed_filter_filterstring, "isc=true", "&");
            }
            if ($(".search-input").find("#sid").attr("checked") == 'checked' ||
                $(".search-input").find("#Sid").attr("checked") == 'checked') {
                speed_filter_urlparam = sf_addparameterblock(speed_filter_urlparam, "sid=true", "&");
                speed_filter_filterstring = sf_addparameterblock(speed_filter_filterstring, "sid=true", "&");
            }
            var seacrhcategoryid = $(".search-input").find("#cid :selected").val();
            if (seacrhcategoryid == undefined) {
                seacrhcategoryid = $(".search-input").find("#Cid :selected").val();
            }
            if (seacrhcategoryid > 0) {
                speed_filter_urlparam = sf_addparameterblock(speed_filter_urlparam, "cid=" + seacrhcategoryid, "&");
                speed_filter_filterstring = sf_addparameterblock(speed_filter_filterstring, "cid=" + seacrhcategoryid, "&");
            }
            var seacrhmanufacturerid = $(".search-input").find("#mid :selected").val();
            if (seacrhmanufacturerid == undefined) {
                seacrhmanufacturerid = $(".search-input").find("#Mid :selected").val();
            }
            if (seacrhmanufacturerid > 0) {
                speed_filter_urlparam = sf_addparameterblock(speed_filter_urlparam, "mid=" + seacrhmanufacturerid, "&");
                speed_filter_filterstring = sf_addparameterblock(speed_filter_filterstring, "mid=" + seacrhmanufacturerid, "&");
            }
            var seacrhpf = $(".search-input").find("#pf").val();
            if (seacrhpf == undefined) {
                seacrhpf = $(".search-input").find("#Pf").val();
            }
            if (seacrhpf > 0) {
                speed_filter_urlparam = sf_addparameterblock(speed_filter_urlparam, "pf=" + seacrhpf, "&");
                speed_filter_filterstring = sf_addparameterblock(speed_filter_filterstring, "pf=" + seacrhpf, "&");
            }
            var seacrhpt = $(".search-input").find("#pt").val();
            if (seacrhpt == undefined) {
                seacrhpt = $(".search-input").find("#Pt").val();
            }
            if (seacrhpt > 0) {
                speed_filter_urlparam = sf_addparameterblock(speed_filter_urlparam, "pt=" + seacrhpt, "&");
              
Avatar

Posted: 2 years ago

#6724 Quote

rrogne

Posted: 2 years ago

#6724 Quote
I am not sure if that will solve the problem, because i change that code earlier. But I will give it a try.
var fns_searchepageinputvalue = $(".search-input").find("#q").val();
        if (fns_searchepageinputvalue == undefined)
            fns_searchepageinputvalue = $(".search-input").find("#Q").val();
        if (fns_searchepageinputvalue != undefined && fns_searchepageinputvalue.trim().length > 0) {
            fns_searchepageinputvalue = fns_searchepageinputvalue.trim();
            speed_filter_urlparam = sf_addparameterblock(speed_filter_urlparam, "q=" + fns_searchepageinputvalue, "&");
            speed_filter_filterstring = sf_addparameterblock(speed_filter_filterstring, "q=" + fns_searchepageinputvalue, "&");

I am only interested in the code above, so i will change it to following. I really don't need to set the other parameters. Does your plugin require any parameters to make it work?
Because i sill get following response
{"success":false,"message":"Error. Failed to load products. Please refresh the page and try one more time."}
Avatar

Posted: 2 years ago

#6725 Quote

rrogne

Posted: 2 years ago

#6725 Quote
changed this line
var fns_searchepageinputvalue = $("#search-value").val();
Avatar

Posted: 2 years ago

#6727 Quote

Support

Posted: 2 years ago

#6727 Quote
You forget about first line.

 if ($(".basic-search") != undefined && $(".advanced-search") != undefined)


Do you have such html ID?
Avatar

Posted: 2 years ago

#6728 Quote

rrogne

Posted: 2 years ago

#6728 Quote
Somewhere i do have those classes, because i get into that if statement.

Powered by nopCommerce

Copyright © 2019 FoxNetSoft. All rights reserved