OpenCart extension types determine when and how the core calls your code. A module is plugged into a page layout. Payment and shipping appear during checkout. Totals calculate cart lines, feeds export data outward, and reports appear in the admin panel. Choose the type before you write the first line of code, because it determines file paths, key names in the setting table, and the methods the core expects.
Examples are for OpenCart 4.1; in 4.0.x, model triggers and event handling differ.
What is an extension type and where is it visible in the admin?
In the admin, all extensionsAdditional functionality: a module, a payment or shipping method, a feed, or a theme. They are managed in "Extensions → Extensions." More in the glossary → are gathered on the Extensions → Extensions page. This page corresponds to the marketplace/ route. At the top of the page there is a dropdown list of types, and the selected type shows its own table with Install and Uninstall buttons. The list of types is not hardcoded: the marketplace/ controller simply scans the directory.
- OpenCart 3.0: the core takes files from
admin/. Each file, for examplecontroller/ extension/ extension/ *.php payment.php, handles its own type. The extensions themselves are located inadmin/.controller/ extension/ {тип}/ {код}.php - OpenCart 4.1: the type controllers were moved to
admin/, and extensions now live separately from the core:controller/ extension/ {тип}.php extension/. Built-in extensions are located in the{папка_розширення}/ admin/ controller/ {тип}/ {код}.php extension/opencart/folder.
The menu item and the type itself are shown only if the user group has the access permission for the type controller (extension/ in 3.0, extension/payment in 4.1). For more about these checks, read the article how user_group checks module access.

The core keeps track of every installed extension in the extension table. In 3.0, it has the type and code columns. In 4.1, the extension column was added with the name of the folder where the extension is located, so the core knows which directory to load files from. Extension settings are stored in the setting table with keys such as {тип}_{код}_status, for example payment_cod_status or module_account_status.
What extension types exist in OpenCart 3.0 and 4.1?
The core has more types than the six in the heading, but these six are what developers write most often. The table below lists the types from the standard OpenCart 3.0.4.1, 3.0.5.1, and 4.1.0.4 source code, along with how the core calls each of them.
| Type | Name in the admin | Who calls it | Key method |
|---|---|---|---|
module | Modules (Modules) | Layout positions: common/content_top, column_left, etc. | index() of the catalog controller |
payment | Payments (Payments) | Payment method selection step | getMethod() in 3.0, getMethods() in 4.1 |
shipping | Shipping (Shipping) | Shipping selection step | getQuote() |
total | Order Totals (Order Totals) | Calculation of the cart and order | getTotal() |
feed | Feeds (Feeds) | External request by route | index() of the catalog controller |
report | Reports (Reports) | Reports page in the admin | report() of the admin controller |
Besides these, both versions have the analytics, captcha, currency (currency rates), dashboard (dashboard widgets), fraud, and theme types. OpenCart 3.0: additionally there is advertise. OpenCart 4.1: language (language packs as extensions) and other have appeared, where extensions that do not fit any other type are placed.
How does the core call a module-type extension?
The module type provides a block on the page: a banner, a slider, a list of recommended products. A module does not have its own page; it is displayed by a layout position. The common/content_top, common/column_left, and other controllers take the module codes of the current layout from the layout_module table and execute the corresponding controllers.
The code in layout_module can take one of two forms, and this determines where the settings come from:
- Single module (for example,
account). The code has no number, and the core checks themodule_{код}_statuskey. - Module with instances (
featured,banner,html). Each instance is a row in themoduletable with themodule_id,name,code, andsettingcolumns (settings in JSON format). The code in the layout contains the instance number, and the core passes the controller an array of settings for that specific instance.
OpenCart 3.0: the code in the layout looks like featured.28, and the route extension/ is called. OpenCart 4.1: at the beginning of the code there is also the extension folder name, for example opencart.featured.28, and the route becomes extension/.
The general file structure of such a module is described in the article anatomy of an OpenCart extension. A step-by-step example is in the material how to create your first module from scratch.
How do payments, shipping, and totals work during checkout?
These three types have no storefrontWhat the customer sees: the home page, categories, product page, and cart. More in the glossary → pages or controllers of their own that display anything. The core calls methods of their models when it collects the lists of payment and shipping methods and calculates the total. Therefore, the main file for them is not a catalog controller but a model.
flowchart TD
A["Cart"] --> B["total: getTotal() of each total by sort_order"]
B --> C["shipping: getQuote(address)"]
C --> D["payment: getMethod() in 3.0 / getMethods() in 4.1"]
D --> E["Order confirmation"]
E --> F["Payment controller: button or redirect to provider"]
Payment (payment)
The core goes through all installed payment extensions and calls the model only for those with payment_{код}_status enabled. The model decides whether the method is available for this address and this cart: this is where geo zone, minimum amount, and presence of shipping are checked. If the method is unavailable, it returns an empty array.
- OpenCart 3.0:
getMethod($address, $total)returns one method: an array withcode,title,terms, andsort_order. - OpenCart 4.1:
getMethods(array $address = []): arrayreturns a method with a nestedoptionarray. This way one extension can offer several payment options, and option codes look likecod.cod.
Example
<?php
namespace Opencart\Catalog\Model\Extension\Mymodule\Payment;
class Invoice extends \Opencart\System\Engine\Model {
public function getMethods(array $address = []): array {
$this->load->language('extension/mymodule/payment/invoice');
if (!$this->cart->hasShipping()) {
return [];
}
return [
'code' => 'invoice',
'name' => $this->language->get('heading_title'),
'option' => ['invoice' => ['code' => 'invoice.invoice', 'name' => $this->language->get('heading_title')]],
'sort_order' => $this->config->get('payment_invoice_sort_order')
];
}
}
Shipping (shipping)
The getQuote($address) method returns a shipping methodAn extension that calculates the cost: "Extensions → Extensions," type "Shipping." More in the glossary → with an quote array, where each option has an code of the form flat.flat, cost, tax_class_id, and a formatted text. The title key also differs here: in 3.0 it is title, in 4.1 name. This is where the cost calculation via the carrier's API goes. For how this looks in ready-made solutions for Nova PoshtaThe most popular carrier in Ukraine. The integration usually pulls cities and branches through an API. More in the glossary → and Ukrposhta, see the comparison in the review of shipping modules for OpenCart.
Totals (total)
Before the call, the core sorts totals by the total_{код}_sort_order key, and then each of them adds its own line and changes the grand total. Order matters: tax is calculated after the product subtotal, and a coupon discount comes before or after shipping depending on which sort order numbers are set in the admin.
- OpenCart 3.0:
getTotal($total)receives an array with referencestotals,taxes, andtotal, adds a line to$total['totals'][], and changes$total['total']. - OpenCart 4.1:
getTotal(array &$totals, array &$taxes, float &$total): void, that is, three separate parameters by reference.
How do feed and report differ?
These two types are often confused with modules, although they work quite differently.
Feed (feed) is a controller in the catalog that provides data not to the buyer but to another system: a price list for a marketplace, XML for an advertising network, a sitemap. An external service accesses the route directly. The controller sets the required header through $this and outputs XML instead of an HTML page. OpenCart 3.0: out of the box there are google_base and google_sitemap feeds under the extension/ route. OpenCart 4.1: the type is in the list, but there are no standard feeds in the distribution, so all feeds are added as separate extensions. An example of such an extension is AI LLM Feed, which exports the catalog in a format for language models.
Report (report) lives only in the admin. The Reports page collects installed reports that have report_{код}_status enabled and for which the user has the access permission. It displays the selected report by calling its report method. OpenCart 3.0: the route has the form extension/. OpenCart 4.1: the route is extension/, where the method is separated by a dot. For more on this route separation, read the article how the core finds a controller by route.

What happens when you click Install?
Installation is the same for all types, and it is what turns files on disk into a working extension:
- The core adds a row to the
extensiontable with the type and code, and in 4.1 also with the folder name. - The current user's group is granted the
accessandmodifypermissions: in 3.0 forextension/, in 4.1 for{тип}/ {код} extension/.{папка}/ {тип}/ {код} - If the extension controller has an
installmethod, the core calls it. This is where custom tables are created and events are registered.
Uninstall does the reverse. The core removes the row from extension and all extension keys from setting, and for modules also their instances from the module table. Then it calls the extension's uninstall method. Permissions are handled differently across versions. OpenCart 3.0: the type controller removes permissions for the extension route from all groups. OpenCart 4.1: the standard module controller does not remove permissions. The core does not touch the data in your own tables in any version: it is removed by the module's own uninstall method. Therefore, before uninstalling, warn the administrator that the settings will disappear. Installation does not enable the extension yet: until you save the settings form with the "Enabled" status, the {тип}_{код}_status key does not exist in setting, and the storefront does not see the extension.
During startup, the core loads store settings from the setting table into the config object. In 3.0, this is done by the startup/startup startup controller; in 4.1, by startup/setting. The extension code then reads them via $this, and this method takes values from the already loaded config, not from the database. How settings from the database get into the config is described in the article file configs and database settings.
Which type should you choose for your module?
Choose the type based on the point where the core must call your code, not on how the module looks. A few practical guidelines:
- A block on a page (banner, widget, subscription form) is a module (
module). It is added to a layout via Design → Layouts. - A payment methodAn extension such as card or cash payment. More in the glossary →, for example LiqPay, installment payments, or payment by bank details with QR, is a payment extension (
payment), even if it has its own thank-you page. - Shipping cost calculated by address is a shipping extension (
shipping). A directory of branches and creating waybills in the admin are usually done by the same extension through additional controllers. - A line in the totals (commission, a conditional discount, a packaging fee) is a total (
total). - Data export for an external service is a feed (
feed), and a data table for a manager is a report (report). - Changing core behavior without its own storefront interface, for example an event handler. In 4.1 there is a type for it,
other; in 3.0 this is usually implemented asmodulewithout output.
One extension can combine several roles if you add several files to different type folders. For example, shipping together with a report on shipments. Each type is installed separately and has its own keys in setting.
Summary
- The extension type defines who calls your code and when:
moduleis shown by a layout position,payment,shipping, andtotalare called by checkout,feedis called by an external request, andreportis shown on the Reports page. - For payments, shipping, and totals, the main file is a catalog model with a fixed method. In 4.1 the signatures are typed, and payment returns
getMethods()with options. - In 4.1, extensions live separately from the core, in
extension/, and this folder is part of the routes, permissions, and layout codes.{папка}/ - Installation only registers the extension and grants permissions. It starts working after the settings are saved with the "Enabled" status.
Next, learn how the files of the chosen type are organized and build your first working module. The remaining topics in this section are collected on the page creating extensions for OpenCart.