Jump to content

Home page Popular and New tabs bug


Recommended Posts

Hey everyone!

After every few days of using the shop I have to manually clear cache because these two tabs appear to be visible at the same time as someone views the home page. I suppose it is a bug because that shouldn't be happenig, right? Has anyone else had the same problem?

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Hello guys,
I've added html5 data attribute

data-counter="{$active_li}"

To every single tab.tpl like here

{counter name=active_li assign=active_li}
<li data-counter="{$active_li}"{if $active_li == 1} class="active"{/if}><a data-toggle="tab" href="#blockbestsellers" class="blockbestsellers">{l s='Best Sellers' mod='blockbestsellers'}</a></li>

To check $active_li smarty value, and it solved this problem, it's probably some problem with cache of templates.
Templates to change:
/themes/theme_name/modules/blockbestsellers/tab.tpl

/themes/theme_name/modules/homefeatured/tab.tpl

/themes/theme_name/modules/blocknewproducts/tab.tpl

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...
  • 1 month later...
  • 2 months later...

Did not make it. But everytime i clear cache in BO it is OK for a while.

Now I have the Falkor fix in these 3 files
/themes/theme_name/modules/blockbestsellers/tab.tpl

/themes/theme_name/modules/homefeatured/tab.tpl

/themes/theme_name/modules/blocknewproducts/tab.tpl

Should I revert them to original?

Edited by Petter B (see edit history)
Link to comment
Share on other sites

  • 2 months later...

Hi there! I had the same problem as you all but I coulnt solved it. What I did following PrestanceDesign instructions is copying the file from "httpdocs/themes/index.js" to the folder "httpdocs/themes". Is it what you mean we should do?

Thank you very much for your help! ;)

 

Hi,

 

You should copy/overwrite in httpdocs/themes/your_active_theme/js/index.js, clear cache and that it ! ;)

Edited by PrestanceDesign (see edit history)
Link to comment
Share on other sites

Hi again! Thank you for replying that fast! Excuse my ignorance... But where do I get the index.js file from? I know I should copy it to this root: httpdocs/themes/your_active_theme/js/index.js  but where do I get the file from?

Thank you very much!

 

In an older post above, you can find answer :

https://www.prestashop.com/forums/topic/321685-home-page-popular-and-new-tabs-bug/?do=findComment&comment=1870800

Link to comment
Share on other sites

Hi,

 

I've the same problem. The first time i open the frontpage it shows "popular" and "special" as active, once i click on "new" evrything works as it should and there is only 1 tab active whatever tab i choose. If i refresh the page it shows 2 tabs active.

I copied the index.js file into the themes/mytheme/js folder as suggested by PrestanceDesign and deactivated and cleared the cache and browser cache but that didn't solve the problem.

This is what i have in my index.js file:

$(document).ready(function(){
$('#home-page-tabs li:first, #index .tab-content ul:first').addClass('active');
});

I didn't change anything to my modules tpl files.

Link to comment
Share on other sites

  • 2 weeks later...

Yes, I have de default theme but I modified it. I send to you a private message with the url... 

 

Thank you very much for your help!

 

 

Solved! Thank you so much to PrestanceDesign. He checked the site and sent to me the code to copy to the index.js file.

 

I have been clearing cache everyday during 3 months... so Thank you so much!

Edited by jcontrerasat (see edit history)
  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...