What Are Extensions?
Extensions are modular components that extend OpenCart’s functionality. They follow a structured architecture and can be installed, configured, and uninstalled through the admin panel without affecting other parts of your store.Extension Types
OpenCart supports multiple extension types, each serving a specific purpose:Payment
Payment gateway integrations for processing customer transactions
Shipping
Shipping method calculators for delivery cost estimation
Module
Display modules for product listings, banners, and content blocks
Theme
Visual themes that control your store’s appearance
Total
Order total modifiers for taxes, discounts, and fees
Report
Analytics and reporting extensions for business insights
Dashboard
Admin dashboard widgets for quick overview
Fraud
Anti-fraud detection systems
Extension Architecture
All extensions in OpenCart follow a consistent MVC (Model-View-Controller) structure:Namespace Convention
Extensions use PHP namespaces following this pattern:The default OpenCart extensions use
Opencart as the vendor namespace, located in upload/extension/opencart/.Managing Extensions
Installation
- Navigate to Extensions → Extensions in the admin panel
- Select the extension type from the dropdown
- Find your extension in the list
- Click the Install button (green plus icon)
- Click Edit to configure the extension settings
Configuration
Each extension has its own configuration page accessible through:- Status: Enable or disable the extension
- Sort Order: Control the display/execution order
- Geo Zone: Limit availability to specific regions
- Extension-specific settings
Uninstallation
To uninstall:- Go to Extensions → Extensions
- Select the extension type
- Click the Uninstall button (red minus icon)
Built-in Extensions
OpenCart comes with a comprehensive set of default extensions:Payment Extensions (4)
Payment Extensions (4)
- Bank Transfer: Accept direct bank transfers
- Cash on Delivery (COD): Payment upon delivery
- Cheque: Accept check payments
- Free Checkout: For zero-value orders
Shipping Extensions (5)
Shipping Extensions (5)
- Flat Rate: Fixed shipping cost
- Free Shipping: No shipping charge
- Item-based: Cost per item quantity
- Pickup: In-store pickup option
- Weight-based: Cost calculated by weight
Module Extensions (13+)
Module Extensions (13+)
- Account: Customer account links
- Banner: Image slider and banners
- Bestsellers: Popular products display
- Category: Category navigation
- Featured: Highlighted products
- Latest: Recently added products
- Special: Products on sale
- And more…
Extension Development
When developing custom extensions:Controller Structure
Every extension controller extends the base controller class:Key Methods
index(): Display the configuration pagesave(): Process and save settingsinstall(): Run when extension is installed (optional)uninstall(): Run when extension is uninstalled (optional)
Configuration Storage
Extension settings are stored in thesetting table with keys prefixed by type:
Extension Marketplace
OpenCart has an official marketplace where you can:- Browse thousands of third-party extensions
- Purchase premium extensions
- Download free extensions
- Read reviews and ratings
- Get support from developers
Best Practices
Use Namespaces
Always use proper namespace conventions to avoid conflicts with other extensions
Language Files
Store all text strings in language files for easy translation
Permission Checks
Validate user permissions before modifying data
Error Handling
Implement proper validation and error handling
Next Steps
Explore specific extension types:- Module Extensions - Content and display modules
- Payment Extensions - Payment gateway integration
- Shipping Extensions - Shipping calculators
- Theme Extensions - Visual customization

