Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure admin controller #131

Open
ghost opened this issue Nov 28, 2020 · 1 comment
Open

Restructure admin controller #131

ghost opened this issue Nov 28, 2020 · 1 comment
Labels
2.2.x Applies to OpenCart 2.2.x 2.3.x Applies to OpenCart 2.3.x 3.0.x Applies to OpenCart 3.0.x maintenance House keeping

Comments

@ghost
Copy link

ghost commented Nov 28, 2020

Admin controller has grown to be a real unordered mess of a file. I'm always frustrated finding the right place to write code for a new feature, or finding a form field in the midst of translations.

This is the norm for OpenCart, most modules have even larger admin controllers with even more spaghetti code, but it would help future development if we could section it a bit so you can easily look up what x variable is for and where to add variable x so it makes sense.

There are 5 tabs: general, subscriber sync, abandoned cart, rss, and abandoned cart status. Start at that perhaps?

@ghost ghost added maintenance House keeping 2.2.x Applies to OpenCart 2.2.x 2.3.x Applies to OpenCart 2.3.x 3.0.x Applies to OpenCart 3.0.x labels Nov 28, 2020
@ghost
Copy link
Author

ghost commented Feb 4, 2021

Repeating code could be extracted into an array and read using a foreach loop. The same could be done for errors and posted fields. This would clear up a lot of repeating code while still being aligned with OpenCart standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.2.x Applies to OpenCart 2.2.x 2.3.x Applies to OpenCart 2.3.x 3.0.x Applies to OpenCart 3.0.x maintenance House keeping
Projects
None yet
Development

No branches or pull requests

0 participants