Hello all!
I have a problem when customers search for products, as Wall displays 9 products when it first opens the search page, and when you scroll down, it just updates the product lists, with 9 identical products, it seems that its doing the search all over again, and shows again the 9 first products, so total we now have 18 products. And then it says end of page, with just half of the correct search result. Any idea how to fix this? Would it be posible to have the template rendering only this page as a list instead of grid?
Take a look at: http://www.renel.no/catalogsearch/result/?q=6w
-
some of you have tried using https://mirasvit.com/magento-2-extensions/reward-points-referral-program.html. Recently I discovered new opportunities and great benefits. I advise from my own experience)
13 answers
Hi cod3gen,
you can try as following to fix this issue
Open the file of skin\frontend\default\jm_wall\js\wall.js there you look for this snap of code
PHP Code:
var pathObject = {
init: function(){
this.path = ($('.next').attr('href') || '');
this.lastpage = parseInt($('#lastpage').html());
this.number = 1;
this.path = (this.path.indexOf('?') == -1 ? this.path : this.path.substring(0,this.path.indexOf('?'))) + '?p=';
},
join: function(page){
this.number = parseInt(this.number) + 1;
if(this.number > this.lastpage) return null;
return this.path + this.number;
}
};
change it to
PHP Code:
var pathObject = {
init: function(){
this.path = ($('.next').attr('href') || '');
this.lastpage = parseInt($('#lastpage').html());
this.number = 1;
},
join: function(page){
this.number = parseInt(this.number) + 1;
if(this.number > this.lastpage) return null;
this.newpath = this.path.replace(/\?p=(\d+)/,"?p="+this.number);
return this.newpath;
}
};
let me know if this helps !
Hello Sherlock!
Nope, did not fix it…
Hi cod3gen,
I see that you have a extension that merge and compress js files, right ? you can try to disable this feature, if that still does not help I will check it further for you
Hello Sherlock!
No luck with that either, still exact same.. :/
Thanks,
Stian
Hello Sherlock!
No luck with that either, still exact same.. :/
Thanks,
Stian
Okay Stian, Please just let me know how can I disable caching, merge and compress features in your back-end I will need further checking on this
Great
Extendware->Manage Extensions->Page Cache->Configure->Level 1 Cache-> Select disable and save config.
Extendware->Manage Extensions->Site optimizer->Configure-> Then go to Files and select Never for Merge JS, Merge CSS and none for JS Minifier and CSS Minifier.
Also, if you are going to do changes to files you need to change where magento picks up its files from, as i have to purge files on CDN if not.
System->Configuration->General->Web->Unsecure change Base Skin, Media and Javascript url to use http://www.renel.no instead of cdn.renel.no
Thanks,
Stian
Hi mate,
I did as you said and when view front-end source code still I see the wall.js file loaded from CDN instead from http://www.renel.no, could you check ?
Morning!
You forgot base javascript url. Fixed now, it loads from webpage server now
Thanks,
Stian
okay, I updated that wall.js file and now you can check to see it works
Its surely getting better, but not quite there yet..:
Searching for LED gives 184 results, first 9 products loads as they should, and next/second load of 9 products is as it should it seems, however, on third fourth fifth and so on, it only repeat products from second load..
Okay, there was still a mistake with the file, I did fix it for you
Great!!
Seems to work as it should now.
Could you also take a look at system.log file, there seems to be some issues with mega menu.. At each page load, generates about 110kb of information in system.log, and rises 150mb each day…
Thanks,
Stian
Hi stian,
Those are just php notice and actually it would not affect anything, I think you can disable system log from writing to get rid of the rises issue