Quick start
Installing the ShopAdmin add-on into OpenCart involves three steps:
- Download the zip file that you receive when you sign up, and unzip it into the admin folder of your OpenCart installation. This zip file is a package containing the following files:
apsona_app.php apsona_config.php apsona_dashboard.js apsona_functions.php apsona_howtoinstall.txt apsona_index.php apsona_init_filters.sql apsona_init_reports.sql apsona_install.php apsona_mysql.php apsona_svc.php controller/tool/apsona_sa.php view/template/tool/apsona_sa.tpl
All the files must be copied into your the admin folder of your OpenCart installation. This will set up ShopAdmin to be accessible via the URL
apsona_index.phpwithin your OpenCart system. - Access the URL apsona_install.php instead of index.php within your admin area. For example, after you log in,
if your store admin URL is
http://my-store.com/admin/index.phpthen your ShopAdmin URL ishttp://my-store.com/admin/apsona_install.php. This will install ShopAdmin and automatically create a menu item for Apsona ShopAdmin in the System menu of your OpenCart admin area. - Log in to your admin area and navigate to
System–Users–User groups, edit theTop Administratorgroup, and enable access to the filetool/apsona_sa.php.
Note also that, unlike with many other OpenCart extensions, you do not need to run the SQL files included in the package. ShopAdmin automatically detects whether they need to be run, and runs them if necessary. This approach is intentional, so as to make the installation process as easy as possible.
If you need assistance with installation or usage, please contact us and we will gladly help get you going.
What the installation process does
The installation process is invoked by apsona_install.php, and does two things:
- It sets up two database tables, apsona_report and apsona_filter, that will maintain ShopAdmin’s filters and reports.
- It appends some JavaScript code to the footer template file
view/template/common/footer.tplso that the ShopAdmin menu item can appear in the System menu. Before making this change, however, it renames the existingfooter.tplfile tofooter.tpl.bak, just in case you want to revert to it at a later time.
On some systems, we have had users tell us that due to permission settings or other causes, the editing of the footer template does not happen, so the system menu item does not appear. If you run into this issue, please download this file, compare it with your version, and replace your version with this one.
Uninstalling ShopAdmin
If for some reason you wish to uninstall ShopAdmin (we hope you don’t), you would take these steps:
- Remove all files in your system’s admin folder and sub-folders whose names begin with
apsona_. - Drop the two tables named
apsona_filterandapsona_reportfrom your database. - Remove the one JavaScript line at the bottom of your file
view/template/common/footer.tpl, or alternatively, renameview/template/common/footer.tpl.baktoview/template/common/footer.tpl.
Security concerns
Security is a primary concern, and an add-on like ShopAdmin should ensure that it prevents any manner of unauthorized access.
OpenCart uses a token-based authentication scheme for accessing its admin area, requiring every page access to include an authentication token. Apsona ShopAdmin conforms to this scheme. When you access ShopAdmin by clicking its menu item, ShopAdmin opens in a new window, where it verifies that the user is indeed logged into the admin area. It does this verification by passing the token in the URL as well as in a cookie, and checks that the two values match. This check ensures that a non-logged-in user cannot directly access the primary ShopAdmin file apsona_index.php. ShopAdmin’s JSON service provider, which lives at the URL apsona_svc.php, also performs this check, so that a non-authenticated user cannot use the JSON services.