Community Add-Ons

Add file to this package
Top » Features

Module Display Order Matches Sort Order in Admin
for osCommerce Online Merchant v2.2

Do you hate the way in the Admin section, under Modules, all your order modules and shipping modules have a Sort Order assigned to them but don't actually DISPLAY in that sort order? It's kind of confusing, and since in the case of the Order Total modules it actually determines the order in which order prices are calculated, this can be a pain in the neck. So I made a small tweak and now all modules in the Admin>Modules section actually DISPLAY in order so it's easier to size them up at a glance.

This contribution makes only a rather minor change to the admin/modules.php file, which will make it list your Order Total, Shipping, and Payment Modules in the sort order you gave them in the first place. (They normally display alphabetically, which is dumb.)

This remedies that. It's purely a cosmetic improvement, and makes the list display much more sensible, as it should have been in the first place. It doesn't affect store functionality in any manner, but should make administrators' jobs a teeny bit easier.

For the sake of convenience, it also puts "not active" text on any module which is in the list but not installed yet, and which therefore HAS no sort order assigned.

Note: Once again, this doesn't change the way the store functions, it ONLY makes the modules display in order in the admin section. Purely a convenience.

HOW IT WORKS: The modules.php file just reads all the module files in your modules directory in alphabetical order and outputs the HTML for each one right there and then. I just created an array to hold the HTML for each module the script finds, and then it sorts that array, and THEN outputs the HTML in proper order.

BACK UP YOUR MODULES.PHP FILE BEFORE INSTALLING. If it doesn't work, just restore the original file.

DIFFICULTY: Novice. Extremely easy! Follow the instructions closely--select a single block of text in your existing modules.php and past new text to replace it.

Legend:  Download   Report

Expand All / Collapse All

Module Display Order Matches Sort Order v.1.1 (Bootstrap Compatible) PiLLaO 26 Jan 2017  

- Make osCommerce Bootstrap Compatible.
- Remove "not active" for non installed modules

---------------------------------------------------

- Ahora compatible con la versión Bootstrap.
- Quitado "not active" de los módulos no instalados (ya no hace falta)

Fixed Sort Order osCommerce4you.com 9 Aug 2007  
Module Display Order Matches Sort Order in Admin Matt Friedman 11 Jan 2005