How can I use a slick slider for a collection list in the debut theme?

Hi,

I am trying to turn a collection list into a slick slider carousel on my homepage (debut theme). I have tried various tutorials but non of them seem to work. The console keeps giving 404 errors and errors like ‘$(this).slick’ is undefined). Does anyone know how to get slick to work on the debut theme?

My store is oletti.nl (oletti.myshopify.com) and password is ‘achterdeschermen’.

Kind regards,

Jerome

HI @Jerome-Oletti ,

if I open your store I see the following errors

which would explain the error.

Regards
Thomas

Hi @tewe ,

I see the same errors, but I do not know how to resolve these errors. That was the reason for my question…

Regards,

Jerome

Hi @Jerome-Oletti

you seem to draw the slick.min.js twice. The line below will not work and throws an error (I am not sure but it should not cause a problem.)

<script type="text/javascript" src="slick.min.js"></script>

The bigger problem is that you load jQuery multiple times. This is probably the source of your error. If I recall it correctly the Debut theme already has jQuery somewhere integrated. If you integrate jQuery more than once you are in trouble.

Regards
Thomas

Hi @tewe ,

I have tried removing the extra jquery loads but it still does not work. I think I might start over. Would you know, from the start, how to get a slick slider in the debut theme?

Regards,

Jerome

Hi @Jerome-Oletti ,

from what I have seen your approach was correct except that multiple versions of jQuery were competing. Maybe this can help you, it is for flexslider but I think they are sufficient similar.

Regards
Thomas

Hi @Jerome-Oletti ,

I just ran - again - into a problem with jQuery. So maybe wrapping the call to the slick slider with

$(window).on('load', function() {
....
}

solves the issue.

Regards
Thomas

Hey guys
I’m trying to put a slick slide in my shop too, but I’m not succeeding. I’ve watched several videos but so far it hasn’t worked. Can someone help me?
The closest I got was to this error:

Thank you for your attention!
Have a good day!

Hi @wesley_prado ,

it looks as if you ran into the double jQuery issue which I described above. Nowdays it looks as if jQuery is loaded by almost any theme, so do not load it again if you want to stay out of trouble.

Regards
Thomas

Hello,

Can I get this code?

Please share.

Thanks!