Watermark

CC PrestaShop Watermark Documentation
Comprehensive documentation for watermark module for PrestaShop (cc_ps_watermark) with advanced backup system, automatic thumbnail regeneration and detailed watermark management.

Table of contents
  1. Introduction
  2. Installation
  3. License activation
  4. Management panel
  5. General settings
  6. Watermark configuration
  7. Backup system
  8. Regeneration of miniatures
  9. Log management
  10. CRON and automation
  11. Font management
  12. Troubleshooting
  13. FAQ

1. introduction
CC PrestaShop Watermark is an advanced module that allows you to automatically add watermarks to all product thumbnails in your PrestaShop store. The module offers a comprehensive system for protecting original images through automatic backups and advanced tools for managing the image watermarking process.

Main functions of the module:
  • Adding text and image watermarks
  • Automatic backup system of original images
  • Regeneration of all thumbnails with watermarking
  • Support for custom TTF fonts
  • Selective processing of thumbnail types
  • Detailed system of logging activities
  • CRON for automatic regeneration
  • Restore original images from backups
  • Multilingual administrative interface
  • License system with full functionality

2 Installation
System requirements
  • PrestaShop 1.7.0.0 or later
  • PHP 7.2 or later
  • MySQL 5.6 or later
  • GD extension for PHP (for image handling).
  • Write permissions on img/ and modules/ directories
  • Minimum 512 MB RAM (1 GB recommended for large stores)
  • Imagettftext functions for TTF font support
Installation process
  1. Download the ZIP file of the module from the official store cocos.codes
  2. Log in to your PrestaShop admin panel
  3. Go to: Modules > Module Manager > Add New Module
  4. Click "Add Module" and select the downloaded ZIP file
  5. When the installation is complete, click "Configure"
  6. The module will automatically create directories: backups/, uploads/, fonts/.
Info
After installation, the module will automatically create the necessary database tables (cc_ps_watermark_log, cc_ps_watermark_backups, cc_ps_watermark_processed), directories for backups and set the default configuration. Before starting work, we recommend activating the license and adding TTF fonts to the fonts/ directory.

3. license activation
It is necessary to activate the license before using the full functionality of the module:
  1. After installation, go to configure the module
  2. Select the "License" tab
  3. Enter the license key you received after purchase
  4. Click "Activate License"
  5. After successful activation, you will see a confirmation message
  6. All functions of the module will be unlocked
Warning
Without an active license, the module will work in limited mode - AJAX functions will be blocked, and a message about an inactive license will be displayed at the top of the administration panel. Basic functions for adding watermarks will be available, but without advanced management options.

4. management panel
The module's management panel consists of several tabs that allow full configuration and management:

Main tabs:
  • Settings - main module configuration, watermark styling
  • Regeneration of miniatures - image regeneration tools with CRON
  • Backups - managing backups of original images
  • Logs - history of module activities with filtering system
  • Documentation - link to online documentation
  • Support - link to support page
  • Plugins - additional COCOS extensions
  • License - module license management
Each tab offers detailed configuration options tailored to a specific aspect of the module's operation.

5. general settings
In the general settings section you will find the basic options that control the operation of the module:

SetupDescriptionDefault value
Enable the moduleGlobal module enable/disableTurned off
Enable backupsAutomatic creation of copies of original imagesEnabled
Functionality of the main switches
  • Module on - watermarks are automatically added to new and updated products
  • Module disabled - watermarks are not added, but existing ones remain intact
  • Backups enabled - a copy of the original is created before each image modification
  • Backups disabled - images are modified directly without copies
Tip
We recommend leaving backups on so you can restore the original images if necessary. Use the module's main switch for quick shutdown during maintenance work.

6. watermark configuration
The module offers two main types of watermarks with extensive configuration of each:

Watermark type
There are two options for tagging images:
TypeDescriptionRequirements
TextText watermark with font and color configurationOptional TTF font
ImageImage watermark with transparency supportPNG/JPG/GIF file

Text character configuration
  • Watermark text - content to be displayed (default: "COCOS.CODES")
  • Font TTF - selection from the available fonts in the fonts/ directory.
  • Font size - From 8 to 200 pixels (default: 24px)
  • Text color - color selection in HEX format (default: #FFFFFFFF)
Image sign configuration
  • Image file - PNG file upload with transparency
  • A preview of the current - displaying the currently used image
  • Maximum size - 2MB per file
  • Supported formats - PNG, JPG, JPEG, GIF
Common positioning settings
  • Watermark position - 9 positions to choose from (corners, centers, center)
  • Repeat watermark - duplication over the entire image
  • Transparency - From 0% (invisible) to 100% (opaque)
Types of thumbnails
We can choose which types of thumbnails to mark:
  • List of all available product image types
  • Display resolution of any type
  • Ability to choose any combination
  • Default: all types are marked
Note
If you do not select any thumbnail type, the module will mark all available types. Changing the settings applies only to newly processed images - use the regenerate function to update existing ones.

7. backup system
One of the most important elements of the module - a comprehensive system for securing original images:

Automatic creation of copies
The system automatically creates backups:
  • Before adding a watermark to an image for the first time
  • For each type of miniature separately
  • Preserving the original directory structure
  • With metadata in the database
Backup statistics
The panel displays useful information:
  • Total number of backups - all backups created
  • Backup products - number of products with protected images
  • Disk occupancy - total size of all copies
  • Last backup - date of latest backup
Backup management
Available operations on backups:
OperationDescriptionComments
Restore all copiesRestores original images from all copiesRemoves watermarks from the entire store
Delete all copiesPermanently removes all copies from diskIrreversible surgery
Restore copies of the productRestores images of only the selected productAvailable for each product separately
List of products with kicks
A detailed table including:
  • Product ID and name
  • Number of backups
  • Size of space occupied
  • Date of last backup
  • Restore button for each product
Pagination and performance
The system has been optimized for performance:
  • 20 products per page
  • Efficient loading of large lists
  • AJAX for copy operations
  • Automatic refresh of statistics
Warning
Operations on backups are irreversible. Restoring a copy removes watermarks, and deleting a copy makes it impossible to restore the original images. We recommend backing up your entire store before major operations.

8. regeneration of miniatures
An advanced regeneration system makes it possible to apply watermarks to existing images:

Manual regeneration
Immediate processing of all thumbnails:
  • "Regenerate thumbnails now" button.
  • Confirmation before the start of operations
  • Progress bar with status information
  • Success or error messages
Automatic regeneration (CRON)
The system allows you to schedule automatic regeneration:
0 2 * * * /usr/bin/php /path/to/prestashop/modules/cc_ps_watermark/cron.php
This command will trigger regeneration every day at 2:00 am.

CRON file
The module includes a dedicated cron.php file offering:
  • Checking if the module is active
  • Set time and memory limits
  • Exactly the same functionality as the button in the panel
  • Logging the results into the console
  • Multilingual error messages
CRON URL
Alternatively, you can use CRON over HTTP:
http://twoja-domena.pl/modules/cc_ps_watermark/cron.php?token=WYGENEROWANY_TOKEN
Performance optimization
The regeneration system has been optimized:
  • Processing in batches of 10 products
  • Automatic memory release
  • Support for time limits (10 minutes for CRON)
  • Increase the memory limit to 512MB
Tip
We recommend regenerating during the hours of least store traffic. For large stores (>1000 products), use CRON instead of manual regeneration by browser.

9. log management
A comprehensive logging system tracks all module activities:

Types of events logged
The system records the following actions:
ActionDescriptionAdditional information
process_imageSingle image processingFile path, status, errors
create_backupBackupBackup location
restore_backupRestore from a copyRestored file
regenerate_allRegeneration of all miniaturesNumber of images processed
process_productProduct processingProduct ID, number of images
Log details
Each entry includes:
  • Log ID - unique identifier of the entry
  • Date and time - exact timestamp of operation
  • Action - type of operation performed
  • Product ID - related product (if applicable)
  • Status - success, warning, error, info
  • Message - detailed description of the incident
Log management
Available features:
  • Pagination - 50 entries per page
  • Sorting - latest entries at the top
  • Cleaning the logs - deletion of all entries
  • Automatic rotation - maximum 5000 entries
Status colors
Visual indication of validity:
  • success - green (operation successfully completed)
  • warning - Yellow (warnings, partial errors)
  • error - red (critical errors)
  • info - blue (general information)
Info
The system automatically maintains a maximum of 5,000 log entries. Older entries are automatically deleted. To maintain a complete history, we recommend periodically exporting logs from the database.

10. CRON and automation
Detailed information about module process automation:

Server configuration
To set up automatic regeneration on the server:
  1. Log in to cPanel/Plesk or via SSH
  2. Find the "CRON Jobs" or "Cron Jobs" section.
  3. Add a new task with the command given in the module panel
  4. Set the frequency as needed (recommended: every night)
  5. Check that the path to PHP is correct
Popular PHP paths
Depending on the server, the path may be different:
/usr/bin/php
/usr/local/bin/php
/opt/php/bin/php
php (if it is in the PATH)
Examples of CRON schedules
Different regeneration frequencies:
ScheduleDescriptionCRON command
Every day at 2:00 a.m.Recommended for most stores0 2 * * *
Every week on SundayFor stores with infrequent changes0 2 * * 0
Every 6 hoursFor stores that are updated frequently0 */6 * * *
Every monthMinimum frequency0 2 1 * *
CRON monitoring
To verify that CRON is working properly:
  • Check module logs after scheduled execution time
  • Test manually calling cron.php through a browser
  • Check server logs for PHP errors
  • Make sure the module is active
CRON security
The cron.php file contains security features:
  • Module activity check
  • Token validation for HTTP access
  • Logging of all operations
  • Graceful error handling
Note
The token for the CRON URL is automatically generated based on PrestaShop configuration and provides basic security. For increased security, we recommend using CRON via command line instead of HTTP.

11. font management
TTF custom font support system for text watermarks:

Catalog of fonts
TTF fonts should be placed in the directory:
/modules/cc_ps_watermark/fonts/
Supported formats
The module supports only TTF (TrueType Font) fonts:
  • Extension: .ttf
  • Checking for the existence of a file before use
  • Automatic detection of available fonts
  • Friendly names based on file names
Recommended fonts
Suggested fonts to use:
FontDescriptionBest use
Roboto-Regular.ttfDefault, modern, readableUniversal application
Arial-Bold.ttfBold, distinctiveClear watermarks
OpenSans-Light.ttfLightweight, elegantSubtle watermarks
Impact.ttfWide, strongProtection against piracy
Font management
System automatically:
  • Scans fonts/ directory for TTF files
  • Generates friendly names (e.g., "Roboto Regular" from "Roboto-Regular.ttf")
  • Checks the availability of the imagettftext function
  • Provides fallback to embedded fonts
Font messages
The panel reports on the status of fonts:
  • No fonts - warning about empty fonts/ directory
  • List of available - selection from detected TTF fonts
  • Font does not exist - validation error when saving
Fallback fonts
If the TTF font is not available, the module uses:
  • Built-in GD font (size 5 - the largest available)
  • Automatic recalculation of text position
  • Preservation of all other settings
Tip
To add a new font, simply upload the TTF file to the fonts/ directory and refresh the configuration page. The font will automatically appear in the selection list. We recommend using fonts with a license that allows commercial use.

12 Troubleshooting
Watermarks are not added to new products
  1. Check if the module is enabled in the general settings
  2. Make sure the license is active
  3. Check that the correct thumbnail types are selected
  4. Verify that the GD extension is installed
  5. Check write permissions on img/ directories.
Errors when regenerating miniatures
  1. Check PHP memory limits (recommended: min. 512MB)
  2. Increase max_execution_time in PHP (recommended: 300 seconds)
  3. Check that all product images are correct
  4. Use CRON instead of browser for large stores
  5. Check module logs for error details
Problems with backups
  1. Check write permissions on the modules/cc_ps_watermark/backups/ directory
  2. Make sure there is enough space on the disk
  3. Check that the backups/ directory was created during installation
  4. Verify the integrity of the database (table cc_ps_watermark_backups)
  5. Check module logs for errors related to backups
CRON does not work
  1. Check that the path to PHP in CRON is correct
  2. Verify permissions to the cron.php file (755)
  3. Make sure that the module is active during CRON execution
  4. Check server logs for errors
  5. Test the execution of cron.php manually via SSH
TTF fonts don't work
  1. Check if the GD extension has TTF support (imagettftext function)
  2. Make sure that the font files have a .ttf extension
  3. Verify permissions to read font files (644)
  4. Check that the font path is correct
  5. Check that the font file is not corrupted
High disk space consumption
  1. Check the size of your backups under "Backups"
  2. Consider deleting old backups
  3. Optimize product images before adding watermarks
  4. Use image compression in PrestaShop settings
  5. Regularly clean up unnecessary backups
Error
If you encounter unsolvable problems with the module, make sure you are using the latest version and that your PrestaShop store is up-to-date. Also check if you have sufficient server resources (RAM, CPU, disk space). In case of difficulties, contact COCOS support via the website. cocos.codes/support.

13 FAQS.
Can I restore the original images after adding watermarks?
Yes, if you have backups enabled. Use the "Restore all backups" function in the "Backups" tab or restore backups for a specific product.

How often should I regenerate my thumbnails?
It depends on the frequency of adding products. For active stores, we recommend daily regeneration by CRON. For less active - weekly or as needed.

Can I use my own TTF fonts?
Yes, drop the TTF files into the /modules/cc_ps_watermark/fonts/ directory and they will automatically appear in the selection list. Make sure you have the right to use the fonts commercially.

What happens if I disable backups?
Images will be modified directly without the ability to restore the original versions. We do not recommend disabling this option.

Can I add a watermark only to certain types of thumbnails?
Yes, in the settings you can select specific types of thumbnails to be marked. Unselected types will remain unchanged.

How to check if CRON is working properly?
Check the "Logs" tab after the scheduled CRON execution time. Regeneration entries should appear. You can also test the cron.php call manually.

Can I change the watermark position for different types of thumbnails?
Currently, the position is global for all types of thumbnails. Separate positions for different types require code modification.

What image formats are supported for watermarking?
PNG, JPG, JPEG and GIF formats are supported. We recommend PNG with transparency for best results.

Can I use the module on a store with thousands of products?
Yes, but we recommend using CRON to regenerate and monitor server resources. Large stores may need to increase PHP limits.

What does "The image already has a watermark" mean in the logs?
The system keeps track of which images have already been processed and does not add the watermark again. This is normal behavior to prevent duplicate marks.

Can I export the module logs?
Currently there is no built-in export function, but all logs are in the cc_ps_watermark_log table and can be exported via phpMyAdmin.

How to remove all watermarks from the store?
Use the "Restore all copies" function in the "Backups" tab. This will restore the original images from all backups.

Does the module affect the performance of the store?
During normal operation, the impact is minimal. Image processing only occurs when adding/updating products or during regeneration.

What happens when the license expires?
Basic features will work, but advanced options like AJAX, backups and regeneration may be limited. We recommend renewing your license.

Can I use the module on a test environment?
Yes, the license also allows use on test subdomains and local development environments according to the terms of the license.

How big font files can I use?
There is no hard limit, but we recommend fonts up to 2MB. Larger files may affect performance when processing images.

Can I use emoji or special characters in watermark text?
Yes, if the TTF font used supports the characters in question. GD's built-in fonts have limited support for special characters.

What does the error "GD extension is not available" mean?
This means that the GD extension for PHP, which is required for image processing, is not installed on the server. Contact your server administrator.

Can I automatically add watermarks to images uploaded via FTP?
The module automatically processes images only for operations through the PrestaShop panel. Images added via FTP require regeneration of thumbnails.

How to change the maximum size of the uploaded watermark image?
The 2MB limit is defined in the ImageHelper class. The change requires modifying the code and increasing the PHP upload_max_filesize limits.

Success
CC PrestaShop Watermark module is a professional tool for protecting product images in online stores. With advanced backup system, process automation and detailed logging system, it provides secure and effective watermark management on all product images.
If you are running a store on PrestaShop and want to protect your product images professionally, we recommend using the CC PrestaShop Watermark module, which will provide comprehensive protection against unauthorized use of images and full control over the product marking process.

Leave Your comment

Your email address will not be published. Required fields are marked *

Recently viewed products

[FREE] PrestaShop PayNow

(0)
$0,00 VAT excluded

PrestaShop and WordPress development services

(0)
$27,00 VAT excluded

WordPress Anti-spam

(0)
$49,00 VAT excluded

Mass product update

(0)
$49,00 VAT excluded

Login

Shopping Cart

Close

Your cart is empty.

Start Shopping