trive-digital / ProductSliderM2

A Magento 2 module for managing product sliders
Other
12 stars 4 forks source link

Doesn't work as slider. Shows products list only. #3

Closed siddiqur-medma closed 8 years ago

siddiqur-medma commented 8 years ago

Problem :- After Installation and creation of a slider from admin, it was just showing a list of products, but no product slider. After debugging I found following error in google chrome browser console :- Uncaught Error: Script error for: slick

Solutions :- 1) Check for file "pub/static/_requirejs/frontend/Magento/luma/en_US/requirejs-config.js", if it contains the code snippet written in module's "view/frontend/requirejs-config.js" file. If not, it means static content is not properly deployed. So, delete all static content and from pub/static directory and run following command in command line :- bin/magento setup:static-content:deploy

Referesh the page and slider should work.

If it still not works, it means there is some problem with static content deployment of your store. In such case try following solution :-

2) Open file "view/frontend/templates/slider/items.phtml" Find line which says "require(['jquery', 'slick'], function($){". you may find it at line no. 116. Replace it with "require(['jquery', 'JakeSharp_Productslider/js/slick.min'], function($){". Make Sure that you have deployed the static content properly using below command in command line:- bin/magento setup:static-content:deploy

Referesh the page and you will find the slider working. :-)

chombe commented 8 years ago

Hi @siddiqur-medma

Thanks for the comment. It looks like this issue is related with static content deployment, not with slider extension itself. Require with 'slick' should also work.