Fix The Scrolling Isue in Sporty Template

If you’re using the Sporty template by Best Kit for Prestashop, or by extension are using any template where you’re noticing problems with features that you too for granted, like scrolling after installing an SSL certificate and enabling HTTPS, you need to take a long, hard look at the Console of your website inspector of your choice.

After you enable SSL / HTTPS in Prestashop, the template (and, I’m guessing a few others) will fail to load some of the scripts installed on a CDN. To fix this problem – and thus your site – you need to make a small change to your website.

The Code Way

Know your way around code? Cool. Then the following steps shouldn’t be an issue for you.

  1. FTP to templates > Sporty
  2. Open the header.tpl file
  3. Go to lines 62 and 63, where you’ll see the following.

[code language=html]

<script src=”http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js”></script>
<script src=”http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/plugins/ScrollToPlugin.min.js”></script>

[/code]

You need to change the URL to use HTTPS instead, so the lines look like this:

[code language=html]

<script src=”https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js”></script>
<script src=”https://cdnjs.cloudflare.com/ajax/libs/gsap/latest/plugins/ScrollToPlugin.min.js”></script>

[/code]

When you save this change, and revisit the website, you should have no problem scrolling away as long as your heart desires. Or unless you reach the end of the page, whichever comes first.

The Easier Way

Now, if you’re not comfortable with making that code change – it happens – but still want to solve this problem we’ve made a little something for you. It will still require you to use FTP.

  1. Download our updated header.tpl file
  2. FTP to templates > Sporty
  3. Replace the header.tpl file with the unzipped version of our file
  4. Try refreshing the site.
  5. Succes!

Of course, this general advice could also applied to other templates if you’re using SSL / https in your PrestaShop site. Check those console warnings, gentlemen.

 

Discover more from PowerUser Guide

Subscribe now to keep reading and get access to the full archive.

Continue reading