CC Documentation Mass Product Update.
Comprehensive documentation for PrestaShop's mass product quantity and price update module with support for file import, CRON tasks and update by criteria (cc_ps_mass_update_product).Table of contents
- Introduction
- Installation
- License activation
- Management panel
- File import
- Mass update by criteria
- CRON tasks
- Login system
- Types of product identifiers
- Column mapping
- Troubleshooting
- FAQ
1. introduction
CC Mass Product Updater is an advanced module for mass updating of product quantities and prices in PrestaShop. The module allows you to import data from CSV, Excel and XLS files, update by criteria and automate processes with CRON tasks.The module offers:
- Import from CSV, XLS, XLSX files from various sources (upload, server, URL)
- Mass update of products by criteria (categories, price range, manufacturer)
- Support for CRON tasks in two modes (configuration and URL parameters)
- Support for different types of product identifiers (ID, EAN, UPC, ISBN, MPN, Reference, GTIN)
- Advanced operation logging system
- Intuitive column mapping with file preview
- Validation and error control
- License management system
- Remembering user settings
2 Installation
System requirements- PrestaShop 1.7 or later
- PHP 7.1 or later
- PHP extension: PhpSpreadsheet (for Excel files)
- Minimum memory: 128MB
- Permission to create temporary directories
- Download the ZIP file of the module from the official store cocos.codes
- Log in to your PrestaShop admin panel
- Go to: Modules → Module Manager → Add New Module
- Click "Add Module" and select the downloaded ZIP file
- When the installation is complete, click "Configure"
- The module will automatically create temporary directories and install the required settings
Info
After installation, the module will automatically create a "Mass updater" tab in the "Enhancements" menu of the administration panel and the necessary working directories in the module's folder.
3. license activation
It is necessary to activate the license before using the full functionality of the module:- After installation, go to configure the module
- Select the "License" tab
- Enter the license key you received after purchase
- Click "Activate License"
- After successful activation, you will see a confirmation message and all features will be unlocked
Warning
Without an active license, the module will operate in restricted mode. The upper part of the administration panel will display a message about the inactive license, and all update operations will be blocked.
4. management panel
The module's management panel is available in the menu "Enhancements" → "Mass updater" and consists of the following tabs:Main tabs:
- File import - import of data from CSV/Excel files
- Mass update - update products by criteria
- CRON tasks - automation configuration
- Logs - viewing and managing logs of operations
Module configuration tabs:
- Settings - general configuration of the module
- Documentation - link to online instructions
- Support - access to technical support
- Plugins - information on additional extensions
- License - module license management
Tip
The module automatically remembers the user's settings (column mappings, file sources, ID types) in the browser's localStorage, which greatly speeds up the work for repeated operations.
5. file import
The "File Import" tab allows you to import product data from various sources and formats.Supported file sources:
- File Upload - upload a file directly from your computer
- Path on the server - pointing to a file located on the server
- URL to file - downloading a file from an external URL
- CSV (with automatic separator detection: , ; | tab)
- XLS (older Excel files)
- XLSX (newer Excel files)
- Select the source of the file
- Point to the file (upload, path or URL)
- Select the type of product identifier
- Determine whether the file contains headers
- Click "Preview and Mapping"
- Map data columns (ID, quantity, price)
- Click "Perform Import"
- Maximum file size: 10MB (configurable)
- Checking file format and integrity
- Data structure validation
- Controlling the availability of external files
Note
The module automatically detects the separator in CSV files and supports different character encodings. Temporary files are automatically deleted after the import operation is completed.
6. mass update by criteria
The "Mass Update" tab allows you to update products based on specific criteria without importing a file.Available selection criteria:
- Categories - selection of products from specific categories
- Product ID range - from the specified ID to the specified ID
- Price range - products with prices within a certain range
- Manufacturer - products of a specific manufacturer
- Status - active or inactive products
- New quantity - setting a specific quantity for all selected products
- New price - setting a specific price for all selected products
- You can update quantity and price at the same time or only one of the parameters
- Select product selection criteria
- Specify new values (quantity and/or price)
- Click "Update Products"
- The system will show the number of updated products and any errors
Warning
Mass update by criteria changes the data of all products that meet certain conditions. We recommend backing up the database before performing mass operations.
7 CRON tasks
The "CRON tasks" tab allows you to configure automatic product update tasks. The module offers two modes of CRON tasks:Configuration mode (one template)
- Saving the settings in the database
- One CRON task for all automatic updates
- Easy configuration via web interface
- Task URL: /modules/cc_ps_mass_update_product/controllers/front/cron.php?token=...
- Passing all parameters directly in the URL
- Ability to create many different CRON tasks
- Configuration flexibility for advanced users
- Each task can have different settings
- Enable "CRON Tasks."
- Select the source of the file (server or URL)
- Point the path or URL to the file
- Configure identifier type and column mapping
- Save your settings
- Add URL to server crontab
- token - security token (required)
- source - file source (server|url)
- file_path - path to a file on the server
- file_url - URL to file
- identifier_type - type of product identifier
- has_header - whether the file contains headers (1|0)
- mapping_identifier - identifier column number
- mapping_quantity - quantity column number
- mapping_price - price column number
# Daily at 2:00 - configuration mode
0 2 * * * /usr/bin/curl "https://sklep.pl/modules/cc_ps_mass_update_product/controllers/front/cron.php?token=abc123"
Every day at 3:00 - update the quantity from the server
0 3 * * * /usr/bin/curl "https://sklep.pl/modules/cc_ps_mass_update_product/controllers/front/cron.php?token=abc123&source=server&file_path=/var/www/files/quantities.csv&identifier_type=ean&has_header=1&mapping_identifier=0&mapping_quantity=1"
Every day at 4:00 - update prices from URL
0 4 * * * /usr/bin/curl "https://sklep.pl/modules/cc_ps_mass_update_product/controllers/front/cron.php?token=abc123&source=url&file_url=https://dostawca.pl/prices.csv&identifier_type=reference&has_header=1&mapping_identifier=0&mapping_price=2"
Info
CRON tasks return a response in JSON format with information about the success of the operation, the number of updated products and the execution time. All operations are logged in the module's log system.
8. login system
The "Logs" tab provides an advanced tracking system for all module operations.Login system functions:
- Automatic logging of all update operations
- Different levels of logging (INFO, WARNING, ERROR)
- Separate log files for each day
- View logs directly in the administration panel
- Ability to download full log files
- Automatic cleaning of old logs
- Login status - enable/disable log saving
- List of log files - overview of all files with dates and sizes
- Log Viewer - display of last 200 lines with coloring by level
- Downloading logs - download full log files
- Cleaning up old logs - deletion of logs older than 30 days
[2025-01-15 14:30:22] [INFO] Starting mass update from file: /var/www/files/products.csv
[2025-01-15 14:30:23] [INFO] Product quantity updated: ID 123, Quantity: 50
[2025-01-15 14:30:23] [WARNING] Product not found by EAN code: 1234567890123
[2025-01-15 14:30:25] [INFO] Mass update completed | Context: {"success":45, "failed":2}
Tip
Logs are saved both in the module's logging system and in standard PrestaShop logs. This allows you to track operations through standard server log analysis tools as well.
9 Types of product identifiers
The module supports different ways of identifying products, which provides maximum flexibility when importing data.Supported ID types:
Type | Description | Example |
Product ID | PrestaShop Internal ID | 123, 456, 789 |
Reference (SKU) | Product code/SKU | PROD-001, ABC-123 |
EAN | European product code (8-13 digits) | 1234567890123 |
UPC | Universal product code | 123456789012 |
ISBN | Book number | 978-3-16-148410-0 |
MPN | Manufacturer's part number | AB-12345 |
INDEX | Product index (uses Reference field) | IND-001 |
GTIN | Global commercial code (checks EAN, UPC, ISBN) | Any of the above |
Selecting the appropriate identifier:
- Product ID - The fastest, but requiring knowledge of internal IDs
- Reference/SKU - most commonly used in online stores
- EAN - standard for physical products
- GTIN - universal, checks all possible barcodes
Note
Selecting the right type of identifier is crucial to the success of the import. The module automatically validates identifier formats and reports incorrect values in logs.
10. column mapping
The column mapping system allows flexible assignment of data from the file to the corresponding product fields.Mapping process:
- After selecting a file, the system shows a preview of the first 5 lines
- The user indicates which column contains the product ID
- Optionally indicates columns with quantity and/or price
- The system validates the correctness of the mapping
- Once approved, the data is imported
- Identifier column - always required
- Quantity column - optional (integers ≥ 0)
- Price column - Optional (real numbers ≥ 0, max 2 decimal places)
- A minimum of one of the columns (quantity or price) must be mapped
- Columns must not be identical
- Module automatically remembers last mappings in localStorage
- Mappings are restored for files with identical structure
- Each mapping contains information about the identifier type and headers
- Mappings are valid for 7 days
- Ability to manually clear memorized settings
ean,name,quantity,price
1234567890123,"Produkt A",50,19.99
1234567890124,"Produkt B",30,29.99
1234567890125,"Produkt C",0,39.99
Success
Automatic memorization of mappings greatly speeds up work on regular imports. The system recognizes the file structure and restores the appropriate settings.
11 Troubleshooting
File import does not work- Check if the module has an active license
- Make sure the file has a supported format (CSV, XLS, XLSX)
- Check file size (default max 10MB)
- For files from the server, check read permissions
- For the URL, check the availability and correctness of the address
- Check the module logs for details of the error
- Verify correctness of column mapping
- Verify the type of product identifier
- Make sure the identifiers in the file are correct
- Check if the products exist in the store
- Verify data format (numbers for quantities and prices)
- Review logs for warnings
- Verify the validity of the security token
- Make sure cron is enabled in the configuration (configuration mode)
- Verify the availability of the source file
- Check the CRON task logs on the server
- Make sure that the URL of the CRON task is correct
- Check if the server can make HTTP requests
- Reduce the size of imported files
- Increase the PHP execution time limit (max_execution_time)
- Increase PHP memory limit (memory_limit)
- Disable logging for very large imports
- Use CRON tasks instead of browser-based imports
- Split large files into smaller pieces
Error
If you still encounter problems, please check the server PHP logs and module logs. In case of critical errors, contact COCOS support via the following page. cocos.codes/support.
12 FAQS.
What are the limits on file size?The default limit is 10MB, but you can increase it in the module settings. Remember the PHP limits (upload_max_filesize, post_max_size).
Can I update only prices without changing quantities?
Yes, you can update only prices or only quantities. In the mapping, just indicate the appropriate column and leave the other column blank.
Does the module support products with attributes?
The module updates the base products. For products with attributes, the quantity and price of the main product are updated.
How often can I run CRON tasks?
The frequency depends on the size of the files and server resources. We recommend no more often than every 15 minutes for large files.
Can I use the module on multiple stores?
The license is valid for one domain. A separate license is needed for each store.
What happens to products that are not found?
Products that are not found are skipped and recorded in the logs as warnings. This does not affect the other products in the import.
Can I restore the previous values after the update?
The module does not automatically create backups. We recommend backing up the database before mass operations.
How can I automate the import from FTP?
Use CRON tasks with the "path on the server" mode, pointing to the directory to which files are sent via FTP.
Does the module log all operations?
Yes, all operations are logged with the option to enable/disable this feature in the settings. The logs contain detailed success and error information.
What character encodings are supported?
The module automatically detects and supports the most popular encodings, including UTF-8, ISO-8859-1, Windows-1250.