Jump to content

[PS 8] Javascript components are not working on my Grid


Recommended Posts

I have started writing about my problem yesterday here and here but then I have realized that it is all one problem: UI-elements that require events bound to some consecutive actions are not working:

  • reset button in my filter is not working
  • pagination selection (how many items to show per page) is not working
  • sorting is not working

In every case "not working" means that nothing happens when I click on a UI element. At the same time, this grid is built using the basic official manual (it uses common controllers for search and reset) and I have already rechecked things twice -- my code seems fine and it doesnt seem to be the case that I must enable these controls somehow.

I'd really appreciate any ideas on how can I debug this (and I am new to Prestashop and relatively new to Symfony).

Thank you in advance.

Link to comment
Share on other sites

OK, I have found this tutorial page about enabling javascript extensions. I appears that the basic grid tutorial missed the point that we must enable the javascript functionality of the grid. And this is described on a paged named "Extent a grid with javascript extensions", which gives me an idea of this page telling me something extending the basics. OK, good that I've found it out. As soon as I added one of the template snippets mentioned there, my pagination setting started working. I am going to adapt this javascript extension manual to my case of writing a module a module to enable other parts (the tutorial seems to be thought for a theme) .

Link to comment
Share on other sites

I have found this topic with a detailed explanation of a solution. I want to apply it now with one slight difference: the explanation links a repository from which we should download some files, but it is a repo for PS >= 9, but it has this branch for earlier versions, where we also can find the files.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...