Jump to content


Photo

disable navigation arrows in homepage slider in prestashop 1.7


  • Please log in to reply
1 reply to this topic

#1 akroma

akroma

    Member

  • Members
  • PipPip
  • 23 posts

Posted 11 December 2017 - 04:18 PM

Hello again,

I cant't find on all web where to disable arrows previous, next in home slider (prestashop1.7.2.2)

Do you know location where to disable this. Looked all files in webftp

Please help me, thanks



looking for the best presta addons with outstanding support? check this: PrestaShop Modules

#2 vekia

vekia

    Advanced Member

  • Members
  • PipPipPip
  • 10166 posts

Posted 11 December 2017 - 04:18 PM

Hello Jozef

welcome after weekend :)

 

open file: /modules/ps_imageslider/js/homeslider.js

there is a code like:

jQuery(document).ready(function ($) {
  var homesliderConfig = {
    speed: 500,            // Integer: Speed of the transition, in milliseconds
    timeout: $('.homeslider').data('interval'),          // Integer: Time between slide transitions, in milliseconds
    nav: true,            // Boolean: Show navigation, true or false
    random: false,          // Boolean: Randomize the order of the slides, true or false
    pause: $('.homeslider').data('pause'),          // Boolean: Pause on hover, true or false
    maxwidth: "",          // Integer: Max-width of the slideshow, in pixels
    namespace: "homeslider",  // String: Change the default namespace used
    before: function(){},  // Function: Before callback
    after: function(){}    // Function: After callback
  };

  $(".rslides").responsiveSlides(homesliderConfig);

});

change:

nav: true, 

to:

nav: false,

Then open file /themes/your-theme/modules/ps_imageslider/views/templates/hook/slider.tpl

remove there code:

    <div class="direction" aria-label="{l s='Carousel buttons' d='Shop.Theme.Global'}">
      <a class="left carousel-control" href="#carousel" role="button" data-slide="prev">
        <span class="icon-prev hidden-xs" aria-hidden="true">
          <i class="material-icons">&#xE5CB;</i>
        </span>
        <span class="sr-only">{l s='Previous' d='Shop.Theme.Global'}</span>
      </a>
      <a class="right carousel-control" href="#carousel" role="button" data-slide="next">
        <span class="icon-next" aria-hidden="true">
          <i class="material-icons">&#xE5CC;</i>
        </span>
        <span class="sr-only">{l s='Next' d='Shop.Theme.Global'}</span>
      </a>

after save it might be required to clear cache to see the changes immediately


free tutorials, free templates, free addons, prestashop modules MndfRK4.png  lpHMrZ5.png  gtKHYO7.png  google-48.png