Book Image

OpenCart Theme and Module Development

By : Rupak Nepali
Book Image

OpenCart Theme and Module Development

By: Rupak Nepali

Overview of this book

Table of Contents (13 chapters)
OpenCart Theme and Module Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The file structure – admin and frontend


When someone uses a module, then it is bound to have an admin section so that the administrator can handle the module functionality and customize the module's settings, such as position, layout, status, and sort order. By all of this, users can show the module wherever they like and enter the customized data that is needed for the module.

Creating a language file for the admin section in OpenCart

Language files are named as MODULENAME.php. For instance, let's say we want to create a language file for the Hello World module. We have to create a helloworld.php file. Language files use the constant=value configuration, where the constant name is used in the code, which never changes. Only the value for that language changes. If the English language is active, then the module retrieves the constant from the English language folder's file, and if some other language is active, then it retrieves the constant from the file of the other language's folder.

For...