Live demo: see this module on the live demo store - demo.alexwaha.com/module-xml-feed
for Opencart v2.3 - 3.x
- Module Information
- Installation Instructions
- General Settings
- Creating and Configuring XML Feeds
- XML Feed Templates
- XML Feed Generation
- Automation via Cron
- Template Variables
- For Developers
- Possible Errors and Recommendations
- License and Contacts
XML Feed is a module for OpenCart that allows you to create and automatically generate product XML feeds for various marketplaces and advertising platforms.
- Multiple XML Feeds - Create unlimited feeds for different platforms
- Ready-to-use Templates - Built-in templates for popular platforms (Google, Facebook, Prom.ua, Hotline.ua, YML)
- Flexible Filtering - Select categories, manufacturers, attributes, and options for export
- Automation - Generate via Cron tasks or manually
- Image Settings - Control image size and quantity
- Multi-language - Support for multiple languages for export
- Multi-currency - Export prices in different currencies
- Shipping Information - Configure delivery and warranty data
- Security - Protect feed access with a key
- Author: Alexander Vakhovski (AlexWaha)
- Website: https://alexwaha.com
- License: GPLv3
- Compatibility: OpenCart 2.3.x - 3.x
- Module Code:
aw_xml_feed
-
Make sure you have the aw_core_oc2.3-3.x.ocmod.zip module installed
Important: This is a helper functionality for all AlexWaha modules
-
For OpenCart 2.3.x, make sure you have a module that disables FTP upload of extensions installed, or you have correct FTP settings in your store settings
Note: This is not required for OpenCart 3.x
-
Install the aw_xml_feed_oc2.3-3.x.ocmod.zip archive through the site admin panel
- Go to Extensions → Installer
- Upload the module archive
- Wait for installation to complete
-
Refresh the modification cache
- Go to Extensions → Modifications
- Click the Refresh button
-
In Extensions → Feeds section, find and enable the module:
alexwaha.com - XML Feed
Important: When enabled, the module will automatically create a database table and set access permissions
Check the installation is correct:
- ✓ Module is present in the feeds list
- ✓ Module settings page opens without errors
- ✓ Folder for XML files has been created (default
xml-feed)
Go to module settings: Extensions → Feeds → alexwaha.com - XML Feed
- Enabled - Module is active and working
- Disabled - Module is disabled, XML feed generation is not possible
Specify the folder name for storing generated XML files.
Default: xml-feed
Requirements:
- 3 to 64 characters
- Use only Latin letters, numbers, and hyphens
- No spaces or special characters
Example: product-feeds or xml-export
Important: The folder will be created automatically in the site root on first feed generation
Number of products processed at once during XML generation.
Recommended value: 250-500
Maximum value: 1000
Tip: If the server experiences timeout errors, reduce the batch size to 100-250
Unique key for secure access to XML feed generation.
Requirements:
- Minimum 8 characters
- Generated automatically on installation
- Can be changed manually
Security: Don't use simple keys like
12345678. The key protects your feeds from unauthorized access
Official name of your store for XML export.
Requirements: 3 to 255 characters
Separate for each language
Example:
- Russian:
Online Electronics Store - English:
Electronics Online Store
Legal name of the company or sole proprietorship.
Requirements: 3 to 255 characters
Separate for each language
Example:
- Russian:
Electronics For All LLC - English:
Electronics For All LLC
Brief description of the store's activities.
Requirements: 10 to 255 characters
Separate for each language
Example:
Sale of electronics, computers,
smartphones and accessories with delivery
throughout the country. Official warranty.
Select the country where your store is registered.
Application: Used in XML feeds to indicate country of origin of goods
Enables/disables output of delivery blocks in all module XML feeds.
- Enabled - Delivery information will be added to XML
- Disabled - Delivery information will not be included
Name of delivery service or delivery method.
Requirements: 3 to 255 characters (if filled)
Separate for each language
Examples:
Nova PoshtaCourier deliveryDHL Express
Number of delivery days.
Requirements: 1 to 365 days
Examples:
1- next day delivery3- 3 day delivery7- week delivery
Delivery cost in the store's default currency.
Requirements: Positive number or 0 for free delivery
Examples:
0- free delivery150- $150 delivery500- $500 delivery
Warranty text to be used if no warranty attribute is specified for the product.
Requirements: 3 to 255 characters (if filled)
Separate for each language
Examples:
12 months24 months manufacturer warrantyStore warranty 1 year
Select inventory statuses when products are considered available for purchase.
Examples:
- In Stock
- To Order
- Pre-order
Important: Products with statuses NOT from this list will be marked as "out of stock"
After saving general settings, a link will appear to manually run generation of all active XML feeds:
https://your-site.com/index.php?route=extension/feed/aw_xml_feed&access_key=your_key
Application: Use this link for testing generation or manual feed updates
The module home page displays a table of all created XML feeds:
| Column | Description |
|---|---|
| Name | Feed name for identification |
| Template | XML template used |
| Filename | XML file name |
| Price List Link | URL of generated XML file |
| Status | Enabled / Disabled |
| Action | Edit / Delete |
Click the "Create" button to open the feed creation form.
Internal feed name for identification in admin panel.
Requirements: 3 to 256 characters
Examples:
Google Merchant FeedFacebook CatalogProm.ua Export
XML file name without extension.
Requirements: 3 to 128 characters
Use: Latin letters, numbers, hyphens
Examples:
google-feedfacebook-catalogprom-export
Important: The
.xmlextension is added automatically
Select template for XML feed generation:
- Google - Google Merchant Center (Google Shopping)
- Facebook - Facebook Product Catalog
- Hotline - Hotline.ua (Ukraine)
- Prom - Prom.ua (Ukraine)
- YML - Rozetka, etc.
Note: Each template has its own XML structure corresponding to platform requirements
Select the language in which product names and descriptions will be exported.
Application:
- Export in Russian for Russian-language platforms
- Export in English for international platforms
- Create different feeds for different languages
Select the currency for prices in XML feed.
Note: Currency rate is used from OpenCart store settings
Application:
- UAH for Ukrainian platforms
- USD/EUR for international platforms
- Enabled - Use original images without resizing
- Disabled - Images will be resized to specified dimensions
Recommendation: Disable to reduce image size and speed up loading on platforms
Image width in pixels (if not using originals).
Default: 800
Recommendations:
- Google/Facebook: 800-1200 pixels
- Prom.ua/Hotline: 600-800 pixels
- YML: 600-1000 pixels
Image height in pixels (if not using originals).
Default: 800
Tip: Use square images (same width and height) for best display on platforms
Number of additional product images in export.
Requirements: 0 to 8
Recommended: 4-6 images
Note: Most platforms accept 1 to 10 images per product
- Enabled - Feed is active and will be generated
- Disabled - Feed will not be generated during automatic updates
Select product categories to be included in the XML feed.
How to select:
- Check the boxes of desired categories
- When selecting a parent category, all subcategories are automatically selected
If no categories selected:
- Products from all categories will be included in the feed (considering manufacturer filter)
Override category names for export (e.g., for Google Merchant).
Application:
- Map to Google Product Taxonomy categories
- Adapt names to platform requirements
Example:
- Your category:
Smartphones - Name in export:
Electronics > Phones > Smartphones
How to configure:
- Find the desired category in the category list
- Enter new name for export in the field on the right
For Google Merchant: Use category hierarchy with
>separator
Select manufacturers (brands) whose products will be included in the XML feed.
How to select:
- Check the boxes of desired manufacturers
- Multiple manufacturers can be selected
If no manufacturer selected:
- Products from all manufacturers will be included in the feed (considering category filter)
Usage example:
- Create feed only for Samsung and Apple products
- Export products of a specific brand to a separate platform
Select product attributes to be included in the XML feed.
Attribute examples:
- Material
- Color
- Size
- Weight
- Manufacturer
- Country of manufacture
How to select:
- Check the boxes of desired attributes
- Attributes will be available in the
<attributes>XML section
Select the attribute that contains product warranty period information.
Application:
- If this attribute is specified for a product, its value will be used in the
<warranty>tag - If attribute is not filled, static text from general settings will be used
Attribute value examples:
12 months24 monthsManufacturer warranty 2 years
Select product options to be included in the XML feed.
Option examples:
- Color
- Size
- Memory
- Volume
How to select:
- Check the boxes of desired options
- Options will be available in the
<options>XML section
Select the option that defines product size.
Application:
- For Google Merchant Center in
<g:size>tag - Special handling for sized products (clothing, footwear)
Examples:
- Clothing size (S, M, L, XL)
- Shoe size (36, 37, 38, 39)
Select the option that defines product color.
Application:
- For Google Merchant Center in
<g:color>tag - Special handling for products with color variations
Examples:
- Black
- White
- Red
- Blue
After configuring all parameters, click the "Save" button to create the feed.
The feed will appear in the list on the module home page.
- In the feeds table, click the "Edit" button (pencil icon)
- Make necessary changes
- Click "Save"
- In the feeds table, click the "Delete" button (trash icon)
- Confirm deletion
Warning: XML file from folder is not deleted automatically, only the database record
The module includes 5 ready-to-use templates for popular platforms.
Each template consists of 3 parts:
- header.twig - XML file header with general store and category information
- items.twig - Products section, generated for each product batch
- footer.twig - XML file closing part
Template location:
catalog/view/theme/default/template/extension/feed/aw_xml_feed/layout/{template}/
Format for Google Merchant Center (Google Shopping).
Files:
layout/google/header.twiglayout/google/items.twiglayout/google/footer.twig
Features:
- Atom 1.0 format
- Google Product Category support
- Size and color options support
- GTIN codes (EAN, UPC, JAN, ISBN)
Format for Facebook Product Feed.
Files:
layout/facebook/header.twiglayout/facebook/items.twiglayout/facebook/footer.twig
Features:
- RSS 2.0 format
- Additional fields for Facebook Ads
- Multiple image support
- Stock and shipping information
Format for Ukrainian marketplace Hotline.
Files:
layout/hotline/header.twiglayout/hotline/items.twiglayout/hotline/footer.twig
Features:
- Hotline-specific format
- Product attributes support
- Warranty and shipping information
Format for Ukrainian marketplace Prom.ua.
Files:
layout/prom/header.twiglayout/prom/items.twiglayout/prom/footer.twig
Features:
- YML format with Prom.ua extensions
- Product options support
- Stock and shipping information
Universal format for Rozetka and other platforms.
Files:
layout/yml/header.twiglayout/yml/items.twiglayout/yml/footer.twig
Features:
- YML standard
- Wide compatibility with CIS platforms
- Options and attributes support
- Shipping and warranty information
You can create your own templates or modify existing ones:
-
Copy template files from:
catalog/view/theme/default/template/extension/feed/aw_xml_feed/layout/{template}/ -
To active theme folder:
catalog/view/theme/{your_theme}/template/extension/feed/aw_xml_feed/layout/{template}/ -
Make necessary changes to TWIG files
-
Use variables from Template Variables section
Important: When updating the module, your custom templates in the theme folder will not be affected
Open the link in your browser (specified in general settings):
https://your-site.com/index.php?route=extension/feed/aw_xml_feed&access_key=your_key
Add feed_id parameter:
https://your-site.com/index.php?route=extension/feed/aw_xml_feed&access_key=your_key&feed_id=1
Note: Feed ID can be viewed in the feed list (when hovering over edit button)
After successful generation you will see a page with results:
XML Feed Generation Results
Generated Feeds:
- Google Merchant Feed
Template: google
URL: https://your-site.com/xml-feed/google-feed.xml
- Facebook Catalog
Template: facebook
URL: https://your-site.com/xml-feed/facebook-catalog.xml
XML files are saved in the folder specified in general settings (default xml-feed):
https://your-site.com/xml-feed/filename.xml
Example:
https://your-site.com/xml-feed/google-feed.xml
https://your-site.com/xml-feed/facebook-catalog.xml
https://your-site.com/xml-feed/prom-export.xml
Use these links to upload feeds to marketplaces.
To automatically update XML feeds, configure a Cron task on the server.
php /path/to/your/site/cli/aw_xml_feed.phpphp /path/to/your/site/cli/aw_xml_feed.php 1Where 1 is the feed ID.
curl "https://your-site.com/index.php?route=extension/feed/aw_xml_feed&access_key=your_key"0 3 * * * php /home/user/public_html/cli/aw_xml_feed.php0 */6 * * * php /home/user/public_html/cli/aw_xml_feed.php0 * * * * php /home/user/public_html/cli/aw_xml_feed.phpIn cPanel:
- Go to Cron Jobs section
- Add new task
- Specify execution frequency
- Paste script path in command field
- Save
Via SSH:
- Connect to server via SSH
- Execute command:
crontab -e - Add line with task
- Save and exit
Recommendation: Update feeds no more than once per hour to avoid unnecessary server load
When creating or modifying XML templates, use the following variables in Twig format: {{variable_name}}
| Variable | Description | Example Value |
|---|---|---|
{{date}} |
Export date | 2025-01-15 14:30:25 |
{{url}} |
Feed URL | https://site.com/xml-feed/feed.xml |
{{language}} |
Export language code | en-gb |
{{currency}} |
Currency code | USD |
{{currency_rate}} |
Currency rate | 1.00 |
{{shop_name}} |
Store name | My Store |
{{company_name}} |
Company name | Company LLC |
{{shop_description}} |
Store description | Electronics Online Store |
{{shop_country}} |
Country code | US |
{{show_delivery_info}} |
Display delivery | true/false |
{{delivery_service}} |
Delivery service | DHL Express |
{{delivery_days}} |
Delivery time | 3 |
{{delivery_price}} |
Delivery price | 150 |
{{warranty_text}} |
Warranty text | 12 months |
Loop through categories:
{% for category in categories %}
{{category.id}}
{{category.name}}
{{category.google_name}}
{{category.parent_id}}
{% endfor %}| Variable | Description |
|---|---|
{{category.id}} |
Category ID |
{{category.name}} |
Category name |
{{category.google_name}} |
Full category path for Google |
{{category.parent_id}} |
Parent category ID |
Loop through products:
{% for product in offers %}
{{product.id}}
{{product.name}}
{{product.price}}
{% endfor %}| Variable | Description |
|---|---|
{{product.id}} |
Product ID |
{{product.name}} |
Product name |
{{product.description}} |
Product description |
{{product.model}} |
Product model |
{{product.url}} |
Product page URL |
| Variable | Description |
|---|---|
{{product.price}} |
Product price |
{{product.special}} |
Sale price (or false) |
{{product.quantity}} |
Quantity in stock |
{{product.available}} |
Availability (true/false) |
{{product.in_stock}} |
In stock (true/false) |
{{product.availability_status}} |
Availability status (in stock, preorder, out of stock) |
{{product.availability_date}} |
Arrival date (for pre-order) |
{{product.condition}} |
Condition (new) |
| Variable | Description |
|---|---|
{{product.category_id}} |
Product category ID |
{{product.vendor}} |
Manufacturer name |
{{product.vendorCode}} |
Article/SKU |
{{product.google_product_category}} |
Category path for Google |
| Variable | Description |
|---|---|
{{product.image}} |
Main image |
{{product.images}} |
Additional images array |
Loop through images:
{% for image in product.images %}
{{image}}
{% endfor %}| Variable | Description |
|---|---|
{{product.gtin}} |
GTIN code (EAN, UPC, JAN or ISBN) |
{{product.ean}} |
EAN code |
{{product.upc}} |
UPC code |
{{product.jan}} |
JAN code |
{{product.isbn}} |
ISBN code |
{{product.mpn}} |
Manufacturer part number |
| Variable | Description |
|---|---|
{{product.weight}} |
Weight with unit |
{{product.shipping}} |
Shipping information |
{{product.warranty}} |
Warranty information |
Loop through attributes:
{% for attribute in product.attributes %}
{{attribute.group}}
{{attribute.name}}
{{attribute.value}}
{% endfor %}| Variable | Description |
|---|---|
{{attribute.group}} |
Attribute group |
{{attribute.name}} |
Attribute name |
{{attribute.value}} |
Attribute value |
Loop through options:
{% for option in product.options %}
{{option.id}}
{{option.group}}
{{option.name}}
{{option.price}}
{{option.quantity}}
{% endfor %}| Variable | Description |
|---|---|
{{option.id}} |
Option value ID |
{{option.group}} |
Option name |
{{option.name}} |
Option value |
{{option.price}} |
Price with option |
{{option.quantity}} |
Quantity for option |
{{option.weight}} |
Weight with option |
| Variable | Description |
|---|---|
{{product.option_size}} |
Size options array |
{{product.option_color}} |
Color options array |
The module creates the aw_xml_feed table:
CREATE TABLE IF NOT EXISTS `oc_aw_xml_feed` (
`feed_id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(256) NOT NULL,
`filename` VARCHAR(128) NOT NULL,
`template` TEXT NOT NULL,
`language_id` INT(11) NOT NULL,
`currency_code` VARCHAR(3) NOT NULL,
`image_origin` TINYINT(1) NOT NULL,
`image_count` INT(11) NOT NULL,
`status` TINYINT(1) NOT NULL,
PRIMARY KEY (`feed_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;xml-feed/
├── src/upload/
│ ├── admin/
│ │ ├── controller/extension/feed/aw_xml_feed.php
│ │ ├── model/extension/feed/aw_xml_feed.php
│ │ ├── language/{lang}/extension/feed/aw_xml_feed.php
│ │ └── view/template/extension/feed/
│ │ ├── aw_xml_feed.twig
│ │ └── aw_xml_feed_form.twig
│ ├── catalog/
│ │ ├── controller/extension/feed/aw_xml_feed.php
│ │ ├── model/extension/feed/aw_xml_feed.php
│ │ ├── language/{lang}/extension/feed/aw_xml_feed.php
│ │ └── view/theme/default/template/extension/feed/aw_xml_feed/
│ │ ├── result.twig
│ │ ├── result_cli.twig
│ │ └── layout/
│ │ ├── google/
│ │ ├── facebook/
│ │ ├── hotline/
│ │ ├── prom/
│ │ └── yml/
│ └── cli/
│ ├── aw_xml_feed.php
│ └── kernel.php
-
Create folder for template:
catalog/view/theme/default/template/extension/feed/aw_xml_feed/layout/custom/ -
Create 3 files:
header.twig- XML headeritems.twig- productsfooter.twig- XML closing
-
Add template to list (in controller):
$this->params['templates'] = [ 'google' => 'Google', 'facebook' => 'Facebook', 'custom' => 'My Custom Template', ];
$this->load->model('extension/feed/aw_xml_feed');
$data = [
'name' => 'My Feed',
'filename' => 'my-feed',
'template' => 'google',
'language_id' => 1,
'currency_code' => 'USD',
'image_origin' => 0,
'image_count' => 6,
'status' => 1
];
$feedId = $this->model_extension_feed_aw_xml_feed->addFeed($data);$this->load->model('extension/feed/aw_xml_feed');
$feeds = $this->model_extension_feed_aw_xml_feed->getFeeds();$this->load->model('extension/feed/aw_xml_feed');
$this->model_extension_feed_aw_xml_feed->deleteFeed($feedId);// Generate via controller
$this->request->get['access_key'] = 'your_key';
$this->request->get['feed_id'] = 1; // optional
$controller = new ControllerExtensionFeedAwXmlFeed($registry);
$controller->index();Causes:
- Incorrect access key in URL
- Access key not configured in module
Solution:
- Check access key in module general settings
- Make sure you're using correct key in URL
- Copy generation link from module settings
Causes:
- No write permissions to folder
- Folder for XML doesn't exist
- PHP can't create folder automatically
Solution:
- Create folder manually in site root (e.g.,
xml-feed) - Set permissions 755 or 777 on folder:
chmod 755 xml-feed
- Check that web server has write permissions
Causes:
- Generation batch size too large
- Many products in catalog
- PHP limitations (max_execution_time)
Solution:
- Reduce batch size in settings to 100-250
- Increase
max_execution_timein PHP settings:max_execution_time = 300 - Use CLI generation via Cron instead of HTTP
Causes:
- Special characters in product names or descriptions
- Incorrect data encoding
Solution:
- Module automatically escapes special characters
- Check that database uses UTF-8
- Make sure product names don't have invalid characters
Causes:
- Filters excluded all products
- Products don't have images (required for some platforms)
- Products disabled or unpublished
Solution:
- Check filters by categories and manufacturers
- Make sure products are enabled and published
- Check products have images
- Temporarily remove all filters for testing
Causes:
- Incorrect XML format for platform
- Missing required fields
- Incorrect field values
Solution:
- Check XML file with platform validator
- Make sure correct template is selected
- Check platform requirements for mandatory fields
- For Google Merchant check GTIN codes presence
Configure automatic updates via Cron 1-2 times per day for data relevance.
Create separate feeds with individual settings for each platform.
Use image resizing (disable "originals") to reduce feed size.
The more product information, the better it will display on platforms.
GTIN codes (EAN, UPC) are required for Google Merchant. Fill them in product cards.
Generate feed manually and check it with platform validator before configuring automation.
Files too large (>50 MB) may not be accepted by some platforms. Use filters.
CLI generation works faster and more stable than HTTP requests.
If you can't solve the problem yourself:
-
Collect information:
- OpenCart version
- XML Feed module version
- Problem description
- Error screenshots
- Sample XML file (first 50 lines)
-
Contact support:
- Telegram: @alexwaha_dev
- Email: support@alexwaha.com
- Bug Report: GitHub Issues
- Contact Form: https://alexwaha.com/contact
Important: Technical support for this module is available on a paid basis only. Bug fixes in the main repository are performed without schedule, as the developer has free time.
Pull Requests are welcome: If you can suggest a solution to any problem, pull-requests on GitHub are welcome.
This project is distributed under the GNU General Public License version 3 (GPLv3).
Rights and authorship of this software belong to the developer: Alexander Vakhovski (Oleksandr Vakhovskyi)
Also known as: Alexwaha
Official website: https://alexwaha.com
- ✓ Free use in commercial projects
- ✓ Code modification for your needs
- ✓ Distribution of modified versions (keeping GPLv3 license)
- ✗ Removal or modification of author information
The module has been tested on clean OpenCart installation and standard theme (Default).
The author is not responsible for:
- Incorrect operation with third-party developer themes
- Conflicts with other modules
- Problems arising from module code modification
- Data loss due to improper use
Recommendation: Always test the module on a test server before installing on production site.
Module setup by author, customization, creating custom templates, resolving conflicts with other modules, platform integration - on paid basis only.
Services:
- Installation and module setup
- Creating custom XML templates
- Configuring marketplace integration
- Resolving conflicts with other extensions
- Module performance optimization
- Usage consultations
Telegram: @alexwaha_dev
Email: support@alexwaha.com
Bug Report: GitHub Issues
Contact Form: https://alexwaha.com/contact
GitHub: https://github.com/AlexWaha/opencart-bundle
Thanks to all module users for feedback, bug reports and improvement suggestions!
Alexwaha.com - XML Feed for OpenCart