Answer the question
In order to leave comments, you need to log in
How to add Custom Field for category and validate output, Opencart?
Good afternoon, the situation is as follows
There is such a task.
It is necessary for the main page to display categories. The client asks to add a checkmark to the category editing, so that when it is selected, it will be displayed on the main (category) if the checkbox is not checked, it will not be displayed.
How can you make such a field (so that you can get it in the $categories array?
Answer the question
In order to leave comments, you need to log in
This cannot be done using standard OpenCart tools. But if on my own, then I see it this way.
1. Add a new field to the category table in the database
2. Get this field in the admin panel, write 0 or 1 to it when saving
3. When displaying on the main page, filter if 1 is shown on the main page, if 0 is not.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question