Answer the question
In order to leave comments, you need to log in
How to load pages with Ajax?
Hello. How can I implement the opening of new pages without reloading pages. For example, how is it on the site makimaki.ru when choosing menu categories? Thanks
Answer the question
In order to leave comments, you need to log in
You send a request to the page of the view for forming a list of goods, pass in the ajax parameters ajax: 1
In the view, check the condition that if this parameter is received by the post, then return the necessary content from the view as a response. You accept data and insert a block into the content
You can, like them, assign each menu item in data-category, for example, an ID of this category and pass it as a parameter. And there sort the array or query to the database by all products that have the corresponding parent id parameter
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question