1. Module overview
KS Pretty URLs is a professional module for PrestaShop 8.x that removes numeric identifiers (IDs) from URLs, creating clean, SEO-friendly links.
https://sklep.pl/37-nasiona
https://sklep.pl/123-nawoz-azotowy.html
https://sklep.pl/content/5-regulamin
https://sklep.pl/nasiona
https://sklep.pl/nawoz-azotowy
https://sklep.pl/regulamin
2. Features
Supported entity types
| Type | Before | After |
|---|---|---|
| Categories | /37-nasiona |
/nasiona |
| Products | /123-produkt.html |
/produkt |
| CMS pages | /content/5-regulamin |
/regulamin |
| CMS categories | /content/category/2-info |
/info |
| Manufacturers | /manufacturer/8-bayer |
/brand/bayer |
| Suppliers | /supplier/3-dostawca |
/supplier/dostawca |
| Blog (ETS Blog) | /blog/12-tytul |
/blog/tytul |
Key features
-
Automatic 301 redirects Old URLs with IDs automatically redirect to the new ones
-
Multilingual Separate pretty URLs for every language
-
Multishop Full multi-store support
-
Optional prefixes Ability to add prefixes such as /c/, /p/
-
Management panel Edit, delete and regenerate URLs
-
Redirect statistics Monitoring of old link usage
-
Automatic updates New URLs generated when an entity is saved
-
Conflict handling Automatic suffixes for duplicates
3. System requirements
| Component | Minimum version |
|---|---|
| PrestaShop | 8.0.0 |
| PHP | 8.1 |
| MySQL | 5.7 / MariaDB 10.3 |
Module compatibility
4. File structure
modules/ks_prettyurls/
├── ks_prettyurls.php # Main module file
├── config.xml # XML configuration
├── LICENSE.txt # License
├── logo.png # Module logo (32x32)
├── index.php # Security file
│
├── classes/
│ ├── KsPrettyUrlsManager.php # URL management class
│ ├── KsTabManager.php # KamikStudio menu class
│ └── index.php
│
├── controllers/
│ └── admin/
│ ├── AdminKsPrettyUrlsController.php
│ └── index.php
│
├── views/
│ ├── css/
│ │ ├── admin.css
│ │ └── index.php
│ └── templates/
│ └── admin/
│ └── index.php
│
├── sql/
│ └── index.php
│
├── translations/
│ └── index.php
│
└── upgrade/
└── index.php
override/classes/
├── Link.php # Link generation override
└── Dispatcher.php # Routing override
5. Installation
Upload the module files
# Via SCP
scp -r ks_prettyurls/ user@server:/var/www/prestashop/modules/
# Or via FTP - upload the ks_prettyurls folder to /modules/
Upload the override files
scp Link.php user@server:/var/www/prestashop/override/classes/
scp Dispatcher.php user@server:/var/www/prestashop/override/classes/
Clear the class cache
rm -f /var/www/prestashop/var/cache/prod/class_index.php
rm -f /var/www/prestashop/var/cache/dev/class_index.php
Install the module
Admin Panel → Modules → Module Manager → Search for "KS Pretty URLs" → Install
Clear the PrestaShop cache
Admin Panel → Advanced Parameters → Performance → Clear cache
Generate the URLs
Admin Panel → KamikStudio → KS Pretty URLs → Configure → "Generate all URLs"
6. Configuration
Accessing the configuration
Menu: KamikStudio → KS Pretty URLs → Configure
Or: Modules → KS Pretty URLs → Configure
Entity types (enable/disable)
| Option | Default | Description |
|---|---|---|
| Categories | ✅ | Removes IDs from category URLs |
| Products | ✅ | Removes IDs from product URLs |
| CMS pages | ✅ | Removes IDs from CMS page URLs |
| CMS categories | ✅ | Removes IDs from CMS category URLs |
| Blog (ETS Blog) | ✅ | Removes IDs from blog post URLs |
| Manufacturers | ✅ | Removes IDs from manufacturer URLs |
| Suppliers | ❌ | Removes IDs from supplier URLs |
URL prefixes (optional)
Prefixes help avoid URL conflicts between different entity types.
| Prefix | Default | With prefix | Without prefix |
|---|---|---|---|
| Categories | (empty) | /c/nasiona | /nasiona |
| Products | (empty) | /p/nawoz | /nawoz |
| CMS | (empty) | /info/regulamin | /regulamin |
| Blog | blog | /blog/tytul | /tytul |
Redirect settings
| Option | Default | Description |
|---|---|---|
| Automatic redirects | ✅ Yes | Old URLs redirect to the new ones |
| Redirect type | 301 | 301 = permanent (SEO), 302 = temporary |
7. Usage
URL management panel
Menu: KamikStudio → KS Pretty URLs
| Action | Description |
|---|---|
| URL list | Table of all generated pretty URLs |
| Edit | Manually change the pretty URL of an entity |
| Delete | Remove a pretty URL (the entity returns to its standard URL) |
| Generate categories | Generate URLs for categories only |
| Generate products | Generate URLs for products only |
| Regenerate all | Generate URLs for all entities |
Automatic generation
URLs are generated automatically when:
- You create a new category/product/CMS page
- You edit an existing entity and change its slug (link_rewrite)
Editing a URL manually
- Go to the URL list
- Click the edit icon next to the chosen entry
- Change the "Pretty URL" field
- Save
8. Database
Table: ps_ks_pretty_urls
Stores the pretty URL → entity mapping.
CREATE TABLE `ps_ks_pretty_urls` (
`id_pretty_url` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`entity_type` VARCHAR(50) NOT NULL,
`id_entity` INT(11) UNSIGNED NOT NULL,
`id_lang` INT(11) UNSIGNED NOT NULL,
`id_shop` INT(11) UNSIGNED NOT NULL,
`pretty_url` VARCHAR(255) NOT NULL,
`original_url` VARCHAR(255) NOT NULL,
`active` TINYINT(1) NOT NULL DEFAULT 1,
`date_add` DATETIME NOT NULL,
`date_upd` DATETIME NOT NULL,
PRIMARY KEY (`id_pretty_url`),
UNIQUE KEY `unique_pretty` (`pretty_url`, `id_lang`, `id_shop`),
UNIQUE KEY `unique_entity` (`entity_type`, `id_entity`, `id_lang`, `id_shop`)
);
Table: ps_ks_pretty_urls_redirects
Stores redirects from the old URLs.
CREATE TABLE `ps_ks_pretty_urls_redirects` (
`id_redirect` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`old_url` VARCHAR(255) NOT NULL,
`new_url` VARCHAR(255) NOT NULL,
`id_lang` INT(11) UNSIGNED NOT NULL,
`id_shop` INT(11) UNSIGNED NOT NULL,
`redirect_type` SMALLINT(3) NOT NULL DEFAULT 301,
`hits` INT(11) UNSIGNED NOT NULL DEFAULT 0,
`last_hit` DATETIME DEFAULT NULL,
`active` TINYINT(1) NOT NULL DEFAULT 1,
`date_add` DATETIME NOT NULL,
PRIMARY KEY (`id_redirect`),
UNIQUE KEY `unique_old_url` (`old_url`, `id_lang`, `id_shop`)
);
9. How it works
URL generation
actionObjectCategoryUpdateAfterKsPrettyUrlsManager::generatePrettyUrl('category', 37)ps_ks_pretty_urls + redirectLink generation (Frontend)
$this->context->link->getCategoryLink(37)Link::getCategoryLink()KsPrettyUrlsManager::getPrettyUrlByEntity('category', 37)https://sklep.pl/nasionaURL resolution (Request)
https://sklep.pl/nasionaDispatcher::dispatch()ps_ks_pretty_urls: pretty_url='nasiona'11. Troubleshooting
404 page after enabling the module
Cause: Missing override files or an outdated class cache.
Solution:
# Check the override files
ls -la override/classes/Link.php
ls -la override/classes/Dispatcher.php
# Delete the class cache
rm -f var/cache/prod/class_index.php
rm -f var/cache/dev/class_index.php
Links still contain IDs
Cause: The Link.php override is not working.
Solution:
// Check whether the override is loaded (temporarily in index.php)
var_dump(get_parent_class('Link'));
// Should return: "LinkCore"
Duplicate URLs
Cause: Two entities share the same slug.
Solution:
- The module automatically adds a suffix:
nasiona,nasiona-2 - Or use prefixes:
/c/nasiona,/p/nasiona
Redirects are not working
Cause: The automatic redirects option is disabled.
Solution:
- Go to the module configuration
- Enable "Automatic redirects"
- Select type: 301
The KamikStudio tab does not appear
Solution:
cd ~/public_html/sklep && php -r "
require 'config/config.inc.php';
require 'modules/ks_prettyurls/classes/KsTabManager.php';
KsTabManager::installTab('ks_prettyurls', 'AdminKsPrettyUrls', 'KS Pretty URLs', 'link');
echo 'Done!';
"
rm -f var/cache/prod/class_index.php
12. FAQ
Does the module affect SEO?
Yes, positively. Clean URLs are indexed better by Google. 301 redirects preserve link juice from the old addresses.
Do I have to use prefixes?
No. Prefixes are optional. Leave the fields empty for clean URLs like /nasiona.
What happens when I uninstall the module?
- The database tables are removed
- Redirects stop working
- URLs return to the standard format with IDs
Recommendation: Before uninstalling, add redirects in .htaccess
Does the module work with cache?
Yes. The module is compatible with PrestaShop cache, Varnish, Cloudflare, Redis/Memcached.
How do I move the module to another server?
- Copy the module folder
- Copy the override files
- Export the tables:
ps_ks_pretty_urls,ps_ks_pretty_urls_redirects - Import them on the new server
- Clear the cache
13. License
KamikStudio Commercial License
License grant
The license permits installing and using the module on:
- 1 (one) production domain
- An unlimited number of development/testing/staging domains
Restrictions
- Reselling, distributing or sharing the module is prohibited
- Removing the author information is prohibited
- Decompiling and modifying the source code for the purpose of duplication is prohibited
Support and updates
- 12 months of free updates from the date of purchase
- Technical support via email (response time up to 48h)
14. Changelog
🎉 First production release
- ✅ Support for categories, products, CMS, blogs, manufacturers
- ✅ Automatic 301/302 redirects
- ✅ Management panel in the Back Office
- ✅ Multilingual and Multishop
- ✅ Optional URL prefixes
- ✅ Redirect statistics
- ✅ Integration with the KamikStudio menu
- ✅ Compatible with PrestaShop 8.x and PHP 8.1+
15. Support
Contact
- kamikstudio.pl
- [email protected]
- +48 519 109 063
- ul. Fabryczna 1, 62-800 Kalisz, Poland
Reporting bugs
When reporting an issue, please include:
- PrestaShop version
- PHP version
- Description of the problem
- Steps to reproduce
- Error logs (if any)
Paid support
We offer:
- Module installation and configuration
- Customization to your individual needs
- Integration with other modules
- Troubleshooting
Rate: €52 net / hour