Kartris has a back end section dedicated to various database related tasks. To access this, go to 'Configuration > Database Admin'.

You may find that some tabs referred to below are not visible when you log in. In this case, the backend.expertmode config setting is probably off. This setting hides some back end features, even to those with 'config' user permissions. You can edit the config setting to turn on expert mode, which will show advanced tabs in the db admin section.

Expert mode also allows you to edit certain field details of config settings and language strings that are normally hidden.

From here you can restart Kartris. This works by making a minor change to the web.config file and saving it – ASP.NET will restart a site when this file is changed. Therefore it only works if your site has write permissions to the root. If you need to restart Kartris and this does not work, you can manually change the web.config via FTP.

Kartris keeps logs of certain actions by admins such as logins and changes to config settings.

Kartris will log ASP.NET errors within the Uploads/Logs folder. This tab allows you to view these errors more conveniently from the back end of Kartris. In the event an error means the site is unavailable, you can view the error logs via FTP, in the following location:

Uploads/Logs/Errors/

Error logs are created with a .config extension to ensure the raw files cannot be served to web users (even if they know the location and name of a particular log file).

The presence of errors does not automatically indicate an issue with your site. 404s (file not found), cancelled orders and some other events will be recorded, as well as errors due to partially formed pages being submitted (for example, if a visitor has a slow internet connection and only receives part of the page before pushing a button). The logs are designed to be a useful tool to provide information to help resolve issues rather than a digest of problems on your site that need to be resolved.

In Kartris versions up to 1.4xxx, the records in the database are protected from casual deletion or modification by a series of triggers. The various stored procedures that update data disable a trigger, update the data and then re-enable it again.

To edit data within the database either via your own query or directly into the database tables, you will need to disable either the specific trigger(s) protecting that data, or all triggers - this can be done from this section. Typically triggers will be reactivated over time automatically when queries on those tables next fire up, although you can also reactivate all triggers here too.

If you need to modify data in the database directly and the back end is not accessible, or is on error, you can run the following stored procedure instead:

_spKartrisDB_DisableAllTriggers


To find this, expand 'Programmability > Stored Procedures' for your database in SQL Management Studio, and then right click and 'Execute Stored Procedure'. Then click 'OK' on the popup that appears. The 'Results' window should appear with a return value of zero.

This provides an easy way to clear data related to products, orders or sessions. It's important not to attempt to clear data directly from Kartris by just blanking all the tables in the database, as some hold data such as config settings and language strings that is vital to the operation of Kartris.

This provides an easy way to run a query against the database. A non-expert would typically only use this if Kartris support staff provide a query for them to run to perform a task such as to alter the database in some way, or find some information that is required for a support issue.

From time to time, you may need to export data from Kartris to a file. This might be anything from a customer list, order details, product inventory or statistical data for external analysis. Kartris provides both a built-in export for customers/orders, as well as a flexible export system that lets you write your own custom exports and save them within Kartris.

Export form

You can specify a date range, the file name you wish to export as, the delimiter (marker) for each field and that indicates string values (non-numeric / text as opposed to numbers). You can optionally include the full order details field (text of the confirmation email to customer stored in the system) and incomplete orders (orders where the status checkbox 'complete' is not yet checked to indicate the order has been fully processed).

The file format is CSV - comma-separated values. This is a text format which spreadsheet programs such as MS Excel and Libre Office Calc can open. If you find data shows up in the spreadsheet with single quotes around values, try exporting again but select a double-quote as the 'string delimiter'.

Custom exports are saved reports that you can run to output specific data that you need. If you go to the 'Saved Exports' tab, you can see some pre-written custom exports that come as standard within Kartris - clicking on edit will allow you to see how these are constructed. An export requires the following information:

  • Export name (any name will do, it just lets you identify this export in a list)
  • Field delimiter (separator between different data values, normally a comma)
  • String delimiter (the marker around text / non-numeric values - experiment with a single or double-quote and open up the resulting file in your spreadsheet program such as Microsoft Excel - if you see the single or double-quote mark around data, then try using a different delimiter)
  • Database query

The database query is the key part of the export. This uses 'structured query language'  (SQL), which is a standard common language that is largely similar on different types of databases to specify which data is to be exported. A full explanation and grounding in writing SQL queries is beyond the scope of this manual, but there are plenty of books and web sites dedicated to the subject.

Microsoft Access and MS SQL Management Studio also include graphical tools to help you build queries.

Advanced users may also prefer to create stored procedures and then call these from the saved export - our standard 'Products data for data tool' export which is included in a default installation uses this method.

This gives an overview of your database, and let's you back it up. Note that this fires the backup facility within MS SQL server. It does not enable a remote backup. You should discuss with your hosting provider about the best way to obtain an off-server back up of your MS SQL database.

MS SQL has a feature called 'full text search' that significantly improves the performance of text searches across data, especially on very large databases with many records. This feature of MS SQL is installed with the 'advanced services' version, and therefore may not be available on all installations. For this reason, we don't activate it as standard. On smaller sites, the performance different with and without FTS isn't significant. You will probably find it simpler not to use this feature.

But larger sites will get a huge benefit from this; especially when you have tens of thousands of items, or more.

Before attempting to activate this feature, check that your server supports it by expanding your database and looking for the 'full text catalogs' folder, as shown below.

fts

If the feature is supported, clicking the link within the FTS tab in your Kartris back end will create the required stored procedures and activate the feature. Searches in both the front and back ends of Kartris will use FTS. For this reason, even stores with a relatively small number of products but with a large customer/order database may also decide to use FTS to improve performance of back end searches.

Powered by tomeCMS